Guard copilot automation workflow against fork PRs#5942
Conversation
❌ Deploy Preview for kubestellar-docs failed. Why did it fail? →
|
|
Hi @Copilot. Thanks for your PR. I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff: DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📌 Fixes
📝 Summary of Changes
pull_request_targetwas allowing the privileged Copilot automation workflow to run without verifying the PR source repository. This change adds a same-repository guard so fork-originated PRs do not invoke the reusable workflow..github/workflows/copilot-automation.ymlcopilot-automationto PRs whose head repo matchesgithub.repositoryExample:
Changes Made
.github/workflows/copilot-automation.ymlto gate the job on same-repository PRspull_request_targetChecklist
Please ensure the following before submitting your PR:
Security Considerations
If this PR modifies any security-sensitive files, confirm:
Leave unchecked if not applicable. See CONTRIBUTING.md for details.
Screenshots or Logs (if applicable)
👀 Reviewer Notes
Small workflow-only security fix. No behavior change for same-repository PRs; fork PRs will now skip this privileged job.
Original prompt