Skip to content

Move the check and the bot out of the workflow file - #64

Merged
geetxnshgoyal merged 1 commit into
mainfrom
refactor/scripts-out-of-workflows
Sep 23, 2026
Merged

geetxnshgoyal merged 1 commit into
mainfrom
refactor/scripts-out-of-workflows

Conversation

@geetxnshgoyal

Copy link
Copy Markdown
Member

Why

GitHub treats a PR whose branch carries an older copy of a workflow file as one that modifies workflows, and then refuses to let GITHUB_TOKEN merge it. Every edit to the workflow therefore strands every fork made before it — that's what blocked #17, #14 and #7 today, and it would happen again on the next edit.

Only .github/workflows/ is restricted.

What

From now on, changing the logic leaves existing forks mergeable.

Tested

  • Check: all 9 harness cases, plus the stale-fork case, run against the extracted .sh.
  • Bot: mocked GitHub API — failure comment, tips on real signatures, 403 gives the sync message and keeps tips, non-403 keeps the council message, merge pinned to the head SHA.
  • Workflow YAML parses; both jobs present.

Needs an admin merge (its own check fails by design). This is the last workflow-file change, so forks made after it stay mergeable.

GitHub treats a PR whose branch carries an older copy of a workflow file
as one that modifies workflows, and then refuses to let GITHUB_TOKEN
merge it — stranding every fork made before the change. That bit #17, #14
and #7 today.

Only .github/workflows is restricted, so the logic moves to
.github/scripts/ (validate-signature.sh, workbook-bot.js) and the
workflow becomes a thin runner. Editing the logic from now on leaves
existing forks mergeable.

Also folds in #63: on a 403 the bot explains the stale fork and how to
sync it, instead of a vague hand-off to the council.
@github-actions

Copy link
Copy Markdown
Contributor

Hi @geetxnshgoyal 👋 thanks for signing the workbook! The check found a problem:

  • This PR changes 3 files. It should change exactly one: signatures/geetxnshgoyal.md. Remove these from the PR: .github/scripts/validate-signature.sh .github/scripts/workbook-bot.js .github/workflows/validate-signature.yml (if you see other people's files, you committed on main — see 'Stuck?' in the README).

How to fix it (in your clone, on the same branch as this PR):

# fix the file as described above, then:
git add -A
git commit -m "Fix signature"
git push

Your file should look like:

# Your Real Name

- **GitHub:** @geetxnshgoyal
- **Batch:** 2026
- **I'm here to:** your own line
- **One thing I've built:** a link, or nothing yet

Push to this same PR. Don't open a new one. This comment updates itself each time the check re-runs.

@geetxnshgoyal
geetxnshgoyal merged commit 979e594 into main Sep 23, 2026
1 of 2 checks passed
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