Skip to content

Add automatic GAP setup workflow#18

Closed
magicmark wants to merge 4 commits intographql:magicmark-patch-1from
magicmark:auto-gap-setup
Closed

Add automatic GAP setup workflow#18
magicmark wants to merge 4 commits intographql:magicmark-patch-1from
magicmark:auto-gap-setup

Conversation

@magicmark
Copy link
Copy Markdown
Contributor

@magicmark magicmark commented May 1, 2026

Add a GitHub Action that runs after PRs get merged to handle GAP-0 -> GAP-N renaming.

Also updates metadata.yml and CODEOWNERS.

magicmark and others added 3 commits May 1, 2026 13:20
When a PR is opened with a GAP-0 directory, a GitHub Action automatically:
- Renames GAP-0 to GAP-N (matching the PR number)
- Updates id and discussion in metadata.yml
- Adds the PR author to CODEOWNERS for the GAP directory

For fork PRs where the bot can't push, it posts a comment with the
manual commands instead.

Also updates CONTRIBUTING.md to reflect that step 3 is now automated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Run on push to main instead of pull_request_target. This avoids all
fork permission issues — the workflow runs on main with full write
access. If GAP-0 doesn't exist (author already renamed it), bail.

Update CONTRIBUTING.md to reflect that the automation runs after merge.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Use the pre-authenticated octokit client for all git operations
(createBlob, createTree, createCommit, updateRef) instead of shelling
out to git. No more git config or execSync.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@magicmark
Copy link
Copy Markdown
Contributor Author

magicmark commented May 1, 2026

Closing this until I've had more time to think it through. The statefulness of this workflow risks going stale / breaking, and the complexity isn't worth it yet.

(We can at least automate CODEOWNERS additions, might send a follow-up for that at some point.)

@magicmark magicmark closed this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant