-
Notifications
You must be signed in to change notification settings - Fork 6
Replace CODEOWNERS with /merge command
#32
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
Open
magicmark
wants to merge
44
commits into
main
Choose a base branch
from
replace-codeowners-with-merge-bot
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
8e9afc8
Replace CODEOWNERS with author-merge GitHub Action
magicmark aece13a
Simplify to /merge comment trigger only
magicmark 4ac87ba
Bump actions/checkout to v6
magicmark 2d3af10
Rename to merge.yml and clean up
magicmark 561ab6a
Use yq instead of grep -oP for parsing metadata.yml
magicmark 4bf612c
Harden merge workflow
magicmark 7ea531b
Clarify sponsor merges the initial GAP PR
magicmark 58c8995
Use exact match for /merge comment trigger
magicmark b8f0081
Remove concurrency guard — merge is idempotent
magicmark d3857bc
Simplify auth check to early-exit on failure
magicmark d47fe1c
Update CONTRIBUTING.md
magicmark 1278fb9
Merge file-fetch and directory-check into one step
magicmark 96e855a
Remove redundant metadata.yml existence check
magicmark 0a58804
Rewrite verification step with github-script
magicmark d973b2b
Revert "Rewrite verification step with github-script"
magicmark 32b5d60
Rewrite merge workflow with github-script
magicmark 72794b7
Extract verify-merge logic to dedicated script file
magicmark ba69f3e
Remove unused ts-check and jsdoc annotation
magicmark c0f5b42
Update verify-merge.js
magicmark 0fcd6d8
Fix gap directory mapping in verify-merge.js
magicmark 607cad1
Harden /merge workflow against race conditions and path traversal
magicmark 6217809
Reject PRs with 100+ files to guard against pagination truncation
magicmark d9f5e77
Simplify import path to use relative ./
magicmark f2610be
Simplify error message for too many files
magicmark 99b191b
Preserve original formatting for unchanged logic
magicmark 6922e08
Keep metadata read on one line
magicmark e604b8e
Rename gapDirSet -> gapDirs
magicmark 141026a
Add clarifying comment for gapDirs extraction
magicmark 5055253
Fix comment example
magicmark e07a65e
Use nested path example in comment to better illustrate slice behavior
magicmark f1db80c
Refactor error handling and improve code readability
magicmark 6218a0f
Add test suite for verify-merge.js
magicmark e1fc9d0
Use alice/bob/charlie/eve in tests instead of real usernames
magicmark c5df1a9
Reject when mergeable is null (still computing)
magicmark 21c34c9
Remove message assertions from tests
magicmark ef46c32
Move vol.fromJSON into beforeEach
magicmark 59de5f9
Remove stray blank lines in tests
magicmark 6802346
Add message assertions back to rejects checks
magicmark 1ef445a
Run prettier on verify-merge files
magicmark 24b5ba8
Revert "Run prettier on verify-merge files"
magicmark 5c4239e
Use regex for path traversal error assertion
magicmark 38bd8b1
Use regexes for error assertions
magicmark 682822d
Use regexes for remaining error assertions
magicmark 46c441c
Merge main into replace-codeowners-with-merge-bot
magicmark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: Merge | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| merge: | ||
| runs-on: ubuntu-latest | ||
| if: > | ||
| github.event.issue.pull_request && | ||
| github.event.comment.body == '/merge' && | ||
| github.event.comment.author_association != 'NONE' | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "24" | ||
| cache: "npm" | ||
|
|
||
| - run: npm ci | ||
|
|
||
| - name: Verify actor is authorized | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| script: | | ||
| const { default: verifyMerge } = await import('./scripts/verify-merge.js'); | ||
| await verifyMerge({ github, context }); | ||
|
|
||
| - name: Merge PR | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_NUMBER: ${{ github.event.issue.number }} | ||
| run: | | ||
| gh pr merge "$PR_NUMBER" --squash | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.