Repository navigation
Fix PR labeling for fork contributions - #14457
Zhibo Zhang (lindicaphxag-tech) wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Removing the environment may hide the credentials and variables still required by the labeling job, leaving fork PRs unable to obtain a token.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Removes the protected environment from pull-request labeling and adds a regression test for the workflow trigger and environment configuration.
Changes:
- Removes
github-app-authfrom the labeling job. - Adds a static workflow test.
File summaries
| File | Description |
|---|---|
.github/workflows/label-pr.yml |
Updates the pull-request labeling job. |
.github/tests/test_label_pr_workflow.js |
Verifies the trigger and environment removal. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
d24b217 to
e869f0a
Compare
e869f0a to
bebeafb
Compare
|
Thanks for flagging this. The change removes the protected environment together with the GitHub App token-minting step. The remaining labeler uses the workflow-provided |
|
@microsoft-github-policy-service agree |
|
Security/test follow-up on head |
Fixes #14438.
The
Label pull requestjob is triggered withpull_request_target, but itsgithub-app-authenvironment has protected-branch rules that block fork PR runs before the job starts. The workflow only checks out the base SHA and already requests a narrowly scoped GitHub App token, so this removes that environment binding from the label job only.The added workflow-level test keeps the
pull_request_targettrigger and verifies that this job does not regain the protected environment.Validation:
node --test .github/tests/*.jsgit diff --check