-
Notifications
You must be signed in to change notification settings - Fork 6
Add repo-config auto-migration workflow #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,60 @@ | ||||||||
| # Automatic repo-config migrations for Dependabot PRs | ||||||||
| # | ||||||||
| # The companion auto-dependabot workflow skips repo-config group PRs so | ||||||||
| # they're handled exclusively by the migration workflow. | ||||||||
| # | ||||||||
| # XXX: !!! SECURITY WARNING !!! | ||||||||
| # pull_request_target has write access to the repo, and can read secrets. | ||||||||
| # This is required because Dependabot PRs are treated as fork PRs: the | ||||||||
| # GITHUB_TOKEN is read-only and secrets are unavailable with a plain | ||||||||
| # pull_request trigger. The action mitigates the risk by: | ||||||||
| # - Never executing code from the PR (migrate.py is fetched from an | ||||||||
| # upstream tag, not from the checked-out branch). | ||||||||
| # - Gating migration steps on github.actor == 'dependabot[bot]'. | ||||||||
| # - Running checkout with persist-credentials: false and isolating | ||||||||
| # push credentials from the migration script environment. | ||||||||
| # For more details read: | ||||||||
| # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||||||||
|
|
||||||||
| name: Repo Config Migration | ||||||||
|
|
||||||||
| on: | ||||||||
| merge_group: # To allow using this as a required check for merging | ||||||||
| pull_request_target: | ||||||||
| types: [opened, synchronize, reopened, labeled, unlabeled] | ||||||||
|
|
||||||||
| permissions: | ||||||||
| contents: write | ||||||||
| issues: write | ||||||||
| pull-requests: write | ||||||||
|
|
||||||||
| jobs: | ||||||||
| repo-config-migration: | ||||||||
| name: Migrate Repo Config | ||||||||
| # Skip if it was triggered by the merge queue. We only need the workflow to | ||||||||
| # be executed to meet the "Required check" condition for merging, but we | ||||||||
| # don't need to actually run the job, having the job present as Skipped is | ||||||||
| # enough. | ||||||||
| if: | | ||||||||
| github.event_name == 'pull_request_target' && | ||||||||
|
||||||||
| github.event_name == 'pull_request_target' && | |
| github.event_name == 'pull_request_target' && | |
| github.actor == 'dependabot[bot]' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header comment mentions a “companion auto-dependabot workflow” skipping repo-config group PRs, but there is no such workflow in this repository. Either add the referenced companion workflow or update the comment to point to the actual mechanism in this repo that ensures repo-config group PRs are handled exclusively by this migration workflow.