Fix PR labeling for fork contributions - #14457
lindicaphxag-tech wants to merge 1 commit into
Conversation
|
lindicaphxag-tech please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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.
| @@ -11,7 +11,6 @@ on: [pull_request_target] | |||
| jobs: | |||
| add_label: | |||
| runs-on: ubuntu-latest | |||
d24b217 to
e869f0a
Compare
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