Skip to content
Open
Show file tree
Hide file tree
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 May 15, 2026
aece13a
Simplify to /merge comment trigger only
magicmark May 15, 2026
4ac87ba
Bump actions/checkout to v6
magicmark May 15, 2026
2d3af10
Rename to merge.yml and clean up
magicmark May 15, 2026
561ab6a
Use yq instead of grep -oP for parsing metadata.yml
magicmark May 15, 2026
4bf612c
Harden merge workflow
magicmark May 15, 2026
7ea531b
Clarify sponsor merges the initial GAP PR
magicmark May 15, 2026
58c8995
Use exact match for /merge comment trigger
magicmark May 15, 2026
b8f0081
Remove concurrency guard — merge is idempotent
magicmark May 15, 2026
d3857bc
Simplify auth check to early-exit on failure
magicmark May 15, 2026
d47fe1c
Update CONTRIBUTING.md
magicmark May 15, 2026
1278fb9
Merge file-fetch and directory-check into one step
magicmark May 15, 2026
96e855a
Remove redundant metadata.yml existence check
magicmark May 15, 2026
0a58804
Rewrite verification step with github-script
magicmark May 15, 2026
d973b2b
Revert "Rewrite verification step with github-script"
magicmark May 15, 2026
32b5d60
Rewrite merge workflow with github-script
magicmark May 15, 2026
72794b7
Extract verify-merge logic to dedicated script file
magicmark May 15, 2026
ba69f3e
Remove unused ts-check and jsdoc annotation
magicmark May 15, 2026
c0f5b42
Update verify-merge.js
magicmark May 15, 2026
0fcd6d8
Fix gap directory mapping in verify-merge.js
magicmark May 15, 2026
607cad1
Harden /merge workflow against race conditions and path traversal
magicmark May 20, 2026
6217809
Reject PRs with 100+ files to guard against pagination truncation
magicmark May 20, 2026
d9f5e77
Simplify import path to use relative ./
magicmark May 20, 2026
f2610be
Simplify error message for too many files
magicmark May 20, 2026
99b191b
Preserve original formatting for unchanged logic
magicmark May 20, 2026
6922e08
Keep metadata read on one line
magicmark May 20, 2026
e604b8e
Rename gapDirSet -> gapDirs
magicmark May 20, 2026
141026a
Add clarifying comment for gapDirs extraction
magicmark May 20, 2026
5055253
Fix comment example
magicmark May 20, 2026
e07a65e
Use nested path example in comment to better illustrate slice behavior
magicmark May 20, 2026
f1db80c
Refactor error handling and improve code readability
magicmark May 20, 2026
6218a0f
Add test suite for verify-merge.js
magicmark May 20, 2026
e1fc9d0
Use alice/bob/charlie/eve in tests instead of real usernames
magicmark May 20, 2026
c5df1a9
Reject when mergeable is null (still computing)
magicmark May 20, 2026
21c34c9
Remove message assertions from tests
magicmark May 20, 2026
ef46c32
Move vol.fromJSON into beforeEach
magicmark May 20, 2026
59de5f9
Remove stray blank lines in tests
magicmark May 20, 2026
6802346
Add message assertions back to rejects checks
magicmark May 20, 2026
1ef445a
Run prettier on verify-merge files
magicmark May 20, 2026
24b5ba8
Revert "Run prettier on verify-merge files"
magicmark May 20, 2026
5c4239e
Use regex for path traversal error assertion
magicmark May 20, 2026
38bd8b1
Use regexes for error assertions
magicmark May 20, 2026
682822d
Use regexes for remaining error assertions
magicmark May 20, 2026
46c441c
Merge main into replace-codeowners-with-merge-bot
magicmark May 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/merge.yml
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 });

Comment thread
magicmark marked this conversation as resolved.
- name: Merge PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
run: |
gh pr merge "$PR_NUMBER" --squash
40 changes: 0 additions & 40 deletions .github/workflows/sync-codeowners.yml

This file was deleted.

3 changes: 0 additions & 3 deletions CODEOWNERS

This file was deleted.

16 changes: 9 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ that address issues outside the core GraphQL specifications.
([@graphql/gaps-editors](https://github.com/orgs/graphql/teams/gaps-editors)),
approved by the TSC to administer the GAP program.
- **Sponsor** — an _editor_ assigned to a GAP who is responsible for approving
the initial contents. A _sponsor_ may also be an _author_.
and merging the initial contents. A _sponsor_ may also be an _author_.
- **Author** — a person (or people) who have made significant contributions to a
GAP, listed in the `authors` field of `metadata.yml`. _Authors_ are given
commit access via `CODEOWNERS` to merge their own and others' submissions to
the GAP.
GAP, listed in the `authors` field of `metadata.yml`. _Authors_ can merge PRs
that only touch their GAP directory (see [Merging](#merging) below).

## GAP Numbering

Expand Down Expand Up @@ -62,9 +61,6 @@ gauge public interest, but doing so is not necessary.
Once approved by the _authors_ and _sponsor_, the PR should be merged by the
_sponsor_.

`CODEOWNERS` will automatically be updated allowing _authors_ to merge future
contributions to their GAP.

> [!IMPORTANT]
> GAP numbers never change. If a proposal needs significant changes, create a
> new GAP and deprecate the old one.
Expand Down Expand Up @@ -126,6 +122,12 @@ The _sponsor_ of a GAP is responsible for ensuring changes to the GAP are
approved by the _authors_ before merging, though this task may also be performed
by the TSC. The _authors_ are responsible for guiding contribution to the GAP.

### Merging

PRs that only modify files within a single `gaps/GAP-N/` directory can be merged
by any _author_ listed in that directory's `metadata.yml` by commenting `/merge`
on the PR.

### Versioning

To release a version of a GAP, copy the current `DRAFT.md` into a `versions`
Expand Down
Loading
Loading