Repository navigation
Fix OneLoc GitHub App installation selection - #11858
missymessa wants to merge 1 commit into
Conversation
Sync the corrected App installation selection from dotnet/dotnet so OneLoc mints the requested organization installation token. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes GitHub App installation selection in Get-GitHubAppToken.ps1 so OneLoc mints an installation token for the requested owner (e.g., dotnet) rather than implicitly using the first installation returned (e.g., microsoft), preventing 403 “Resource not accessible by integration” failures during branch/PR writes.
Changes:
- Adjusts paging logic to flatten the installations REST response before accumulation to avoid nested-array behavior.
- Filters installations by owner with an explicit “exactly one match” requirement (fail-fast on 0 or >1 matches).
- Logs the selected installation ID and owner for easier troubleshooting.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Hey @missymessa there are a few merge conflicts in the PR. Could you please take a look and resolve them? |
|
This is now superseded by Arcade source flow rather than needing a manual conflict resolution. The exact installation-selection fix in this PR flowed into Because |
OneLoc currently receives a token for the first GitHub App installation (microsoft) instead of selecting the requested dotnet installation. That causes 403 Resource not accessible by integration when localization tries to create locfiles/* branches or update PRs.
This syncs the focused installation-selection fix already merged in dotnet/arcade#17312 and propagated to dotnet/dotnet main. It flattens the installations response before filtering, requires exactly one owner match, and logs the selected installation.
Evidence:
Microsoft Reviewers: Open in CodeFlow