Skip to content

Fix OneLoc GitHub App token handling - #17263

Merged
missymessa merged 2 commits into
mainfrom
missymessa/fix-oneloc-github-app-review-feedback
Aug 6, 2026
Merged

missymessa merged 2 commits into
mainfrom
missymessa/fix-oneloc-github-app-review-feedback

Conversation

@missymessa

Copy link
Copy Markdown
Member

Follow-up to #17258. This applies the same review fixes as the release/10.0 and release/9.0 backports (#17261 and #17262).

  • Read the Key Vault signature deterministically from value with TSV output.
  • Fetch all GitHub App installation pages and match owner logins case-insensitively.
  • Preserve the calling pipeline's 1ES context through the core token step.
  • Clarify that repository access is controlled by the App installation configuration.

Validation:

  • PowerShell parser validation
  • Mocked two-page installation lookup with mixed-case owner
  • git diff --check

Address review feedback by reading the Key Vault signature deterministically, paginating installation lookup, preserving 1ES template context, and clarifying installation token scope.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: cf5c9dac-de56-477f-9858-541b9fec0178
Copilot AI review requested due to automatic review settings August 5, 2026 22:31
@missymessa
missymessa requested a review from mmitche August 5, 2026 22:33
@missymessa
missymessa enabled auto-merge (squash) August 5, 2026 22:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the OneLoc GitHub App authentication flow to make token minting and installation selection more reliable across Key Vault/Azure CLI output formats and GitHub installation pagination, while keeping pipelines correctly routed through the core templates (including 1ES context propagation).

Changes:

  • Read Key Vault sign output deterministically via --query value --output tsv to avoid brittle JSON parsing.
  • Page through GitHub App installations and match the target owner case-insensitively.
  • Route OneLocBuild through the core get-github-app-token.yml step and propagate is1ESPipeline; clarify repo access is governed by the GitHub App installation configuration.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
eng/common/Get-GitHubAppToken.ps1 Stabilizes Key Vault signature retrieval and improves GitHub App installation lookup (paging + case-insensitive owner match).
eng/common/core-templates/job/onelocbuild.yml Switches to core token-minting step template and forwards is1ESPipeline to preserve pipeline context.
Documentation/OneLocBuildGitHubApp.md Clarifies that repo access is determined by GitHub App installation configuration; updates template link.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +111 to +113
$installations += $pageInstallations
$page++
} while ($pageInstallations.Count -eq 100)
Copilot AI review requested due to automatic review settings August 6, 2026 01:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@missymessa
missymessa merged commit 147da4b into main Aug 6, 2026
10 of 13 checks passed
@missymessa
missymessa deleted the missymessa/fix-oneloc-github-app-review-feedback branch August 6, 2026 14:36
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants