Repository navigation
Conversation
Re-adds `environment: copilot-pat-pool` to the trigger-review job. This was removed in #36005 because the Testing-MI-gh2zdo managed identity (behind AZDO_TRIGGER_CLIENT_ID) had no federated credential matching the environment-scoped OIDC subject, which broke /review. A federated credential with subject 'repo:dotnet/maui:environment:copilot-pat-pool' is being added to the managed identity, so the environment gating can be restored. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36414Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36414" |
There was a problem hiding this comment.
Pull request overview
This PR re-enables GitHub Actions environment gating for the /review trigger workflow by restoring environment: copilot-pat-pool on the trigger-review job in .github/workflows/review-trigger.yml. This aligns the job’s OIDC subject with the intended environment-scoped federated identity configuration for the AzDO token exchange.
Changes:
- Re-added
environment: copilot-pat-poolto thetrigger-reviewjob so environment-scoped secrets and the environment-scoped OIDC subject are used.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/review-trigger.yml | Restores environment gating for the trigger-review job to use the copilot-pat-pool environment. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
|
Closing — after review, |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Summary
Re-adds
environment: copilot-pat-poolto thetrigger-reviewjob inreview-trigger.yml.Why
Environment gating was originally added in #35974 (
environment: gh-aw-agents) and then reverted in #36005. The revert was necessary because gating changes the GitHub OIDC token subject fromrepo:dotnet/maui:ref:refs/heads/mainto an environment-scoped subject, and the managed identity (Testing-MI-gh2zdo, behindAZDO_TRIGGER_CLIENT_ID) had no federated credential for that subject — so every/reviewcommand failed with:That was a temporary workaround put in place while we couldn't add/fix the credential on the managed identity. The environment has since been standardized to
copilot-pat-pool(#36204), and a matching federated credential is being added to the identity:With that credential in place, the environment gating can be restored.
What changed
environment: copilot-pat-poolto thetrigger-reviewjob (1 line).id-token: writeand the OIDC → AzDO token exchange are unchanged.Do not merge until the federated credential with subject
repo:dotnet/maui:environment:copilot-pat-poolexists on theTesting-MI-gh2zdomanaged identity. Merging before the credential is created will break/reviewagain withAADSTS700213.Validation
After merge, run
/reviewon a PR and confirm thetrigger-reviewjob's OIDC → AzDO token exchange succeeds (noAADSTS700213) and themaui-copilotpipeline is triggered.