Skip to content

Website: Fix the Auto Stagnant Bot, which has never run in this repository - #1952

Open
Cybercentry wants to merge 3 commits into
ethereum:masterfrom
Cybercentry:ci/auto-stagnant-bot
Open

Website: Fix the Auto Stagnant Bot, which has never run in this repository#1952
Cybercentry wants to merge 3 commits into
ethereum:masterfrom
Cybercentry:ci/auto-stagnant-bot

Conversation

@Cybercentry

Copy link
Copy Markdown
Contributor

The Auto Stagnant Bot has never moved an ERC to Stagnant.

Why

Two faults, one hiding the other.

  1. Until 2b5baad (4 Aug 2026) the job was gated on github.repository == 'ethereum/eips', so every run here was skipped.
  2. Now that it runs, it fails. ethereum/EIP-Bot reads a hardcoded EIPS/ directory, which does not exist in this repo. From run 31285609418:
UnhandledPromiseRejectionWarning: HttpError: Not Found
    at async Object.getEIPs (.../build/src/lib.js:54:22)

The step still reports success, because node-version: '14' turns an unhandled rejection into a warning instead of a non-zero exit. EIP-Bot was archived in January 2023, so this cannot be fixed upstream.

What this does

Adds .github/scripts/mark-stagnant-ercs.js (~280 lines, Node built-ins only, no package.json needed) and points the workflow at it via actions/github-script. Each run:

  1. reads last-edited dates from git log (hence fetch-depth: 0)
  2. selects Draft and Review ERCs untouched for 6 months, skipping any file with an open pull request
  3. opens one pull request per ERC moving it to Stagnant, labelled created-by-bot / 1272989785, mentioning the authors
  4. squash merges its own pull requests once they are 2 weeks old

The 2 week delay is the author's notice period, matching EIPs. node-version: '14' is removed so failures are visible.

Deliberately simpler than EIP-Bot: branch names are deterministic (mark-erc-<n>-stagnant) and files with open pull requests are skipped, which together make duplicate pull requests impossible — so EIP-Bot's close-repeats, close-obsolete and orphan-branch-cleanup routines are not needed.

Before merging

611 ERCs: 221 Draft, 63 Review. 214 have not been edited in 6+ months, the oldest untouched since the repo was split out in October 2023. The backlog is eligible all at once, so the first run opens ~214 pull requests (~850 check runs) and merges them 2 weeks later. Subsequent runs handle only that week's handful.

workflow_dispatch takes a dry-run input, defaulting to true, which lists the affected ERCs in the job summary without changing anything. Worth running once first. Scheduled runs always run live.

Happy to add a per-run cap if you would rather drain it gradually.

Testing

Against a full clone with the API mocked: 214 eligible, 213 after excluding one with an open pull request; one pull request, branch, commit and label set each; only a bot pull request older than 2 weeks is merged, by squash; a 3-day-old one is not; the commit changes exactly one line, status: Review to status: Stagnant.

Not covered: no mutating call has run against a live repository, as they need secrets.TOKEN.

@eip-review-bot

eip-review-bot commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

File .github/scripts

Requires 2 more reviews from Editors: @g11tech, @jochem-brouwer, @lightclient, @samwilsn, @xinbenlv

File .github/scripts/mark-stagnant-ercs.js

Requires 2 more reviews from Editors: @g11tech, @jochem-brouwer, @lightclient, @samwilsn, @xinbenlv

File .github/workflows/auto-stagnate-bot.yml

Requires 2 more reviews from Editors: @g11tech, @jochem-brouwer, @lightclient, @samwilsn, @xinbenlv

@eip-review-bot eip-review-bot changed the title CI: Fix the Auto Stagnant Bot, which has never run in this repository Website: Fix the Auto Stagnant Bot, which has never run in this repository Aug 15, 2026
@Cybercentry

Copy link
Copy Markdown
Contributor Author

Thank you, @Mayrisass!

Hi @poojaranjan, could you please add this to the next Office Hour for the second review? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants