Restrict maintenance workflows to upstream repo#10102
Merged
Merged
Conversation
Prevent write-capable maintenance workflows from running in forks by adding an upstream repository guard to their jobs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Write-capable maintenance workflows copied into forks can run outside the upstream repository. In particular, the API diff updater can create or update fork-local branches/PRs, and the stale issue/PR locker can act on fork issue trackers.
Solution
Add a job-level repository guard to the API diff and locker workflows so they only execute when
github.repositoryisdotnet/orleans. This keeps the maintenance automation active in the upstream repo while skipping the jobs in forks.Reviewer focus
Please confirm the scope is limited to maintenance workflows with repository/issue/PR write permissions and does not unintentionally disable contributor CI.
Microsoft Reviewers: Open in CodeFlow