Skip to content

Handle Fork Pull Requests - #846

Closed
Muiris Woulfe (muiriswoulfe) wants to merge 1 commit into
microsoft:mainfrom
muiriswoulfe:fix/fork-pull-request-safety
Closed

Handle Fork Pull Requests#846
Muiris Woulfe (muiriswoulfe) wants to merge 1 commit into
microsoft:mainfrom
muiriswoulfe:fix/fork-pull-request-safety

Conversation

@muiriswoulfe

Copy link
Copy Markdown
Member

Purpose

Prevent fork-originated pull requests from running privileged automation when repository credentials are unavailable.

Impact

Fork pull requests retain read-only build and security checks. Privileged updates are skipped, and reviewers receive a caution about reduced automation.

Prevent fork-controlled code from accessing production OIDC
credentials while retaining read-only checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents privileged automation from running on fork-originated pull requests while retaining read-only validation.

Changes:

  • Skips credential-dependent build jobs for fork pull requests.
  • Adds a caution comment when a fork pull request is opened.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/fork-pull-request-caution.yml Posts the fork-review caution.
.github/workflows/build.yml Restricts privileged jobs to trusted branches.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@muiriswoulfe

Copy link
Copy Markdown
Member Author

Superseded by #847, which uses a branch in the base repository so the privileged workflow path can run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants