Skip to content

fix(ci): migrate github-script to v8 — repair the broken gate check#260

Merged
zeshi-du merged 1 commit into
mainfrom
fix/github-script-v8-public
Jul 17, 2026
Merged

fix(ci): migrate github-script to v8 — repair the broken gate check#260
zeshi-du merged 1 commit into
mainfrom
fix/github-script-v8-public

Conversation

@zeshi-du

@zeshi-du zeshi-du commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Why

The gate check (and the ci-nudge/issue-triage bots) is mechanically red on every recent PR: GitHub's runner infra now force-runs actions/github-script@v7 on Node 24, where the script-side require('@actions/github') can't resolve — the failure has nothing to do with whether a PR links an issue. Sorry for the confusing red ✗ everyone has been seeing.

What

  • Pin actions/github-script to ed597411… # v8.0.0 in pr-triage / ci-nudge / issue-triage.
  • Replace require('@actions/github').getOctokit(APP_TOKEN) with new (github.constructor)({ auth: APP_TOKEN }). v8.0.0 injects no getOctokit script parameter (verified against src/async-function.ts at the pinned SHA), so a require-free construction from the injected client's own class is the safe route.
  • Bump actions/stale to 1e223db… # v10.4.0.

Diagnosis credit: @sandman-sh first surfaced the Node-24/v8 root cause in #257. 🙏

Note for contributors: existing PRs will show a green gate after their next push or re-run.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated GitHub automation actions to newer versions for improved compatibility and maintenance.
    • Preserved existing CI failure notifications, issue and pull request triage, and stale-item handling behavior.

…te check

GitHub's runner infra force-upgrades actions/github-script@v7 to Node 24,
where the script-side require('@actions/github') can no longer resolve.
Every recent PR shows a red 'gate' check with 'Cannot find module
@actions/github' regardless of whether it links an issue.

- Pin actions/github-script to ed597411 (v8.0.0) in pr-triage, ci-nudge,
  issue-triage.
- Replace require('@actions/github').getOctokit(APP_TOKEN) with
  new (github.constructor)({ auth: APP_TOKEN }) — v8.0.0 injects no
  getOctokit helper (verified against src/async-function.ts at the pinned
  SHA), and the wrapped require cannot resolve modules without a checkout.
- Bump actions/stale to 1e223db (v10.4.0).

Diagnosis first surfaced by @sandman-sh in #257 — thank you! This lands
separately with a SHA pin and a require-free client construction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@zeshi-du
zeshi-du merged commit d2f0357 into main Jul 17, 2026
10 of 11 checks passed
@zeshi-du
zeshi-du deleted the fix/github-script-v8-public branch July 17, 2026 23:44
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c5809459-ee90-4c6c-b6b9-9a0ca176a872

📥 Commits

Reviewing files that changed from the base of the PR and between 7b4937b and 27f97a9.

📒 Files selected for processing (4)
  • .github/workflows/ci-nudge.yml
  • .github/workflows/issue-triage.yml
  • .github/workflows/pr-triage.yml
  • .github/workflows/stale.yml

Walkthrough

Changes

Workflow maintenance

Layer / File(s) Summary
GitHub Script execution and authentication
.github/workflows/ci-nudge.yml, .github/workflows/issue-triage.yml, .github/workflows/pr-triage.yml
Updates actions/github-script to v8.0.0 and changes App-token Octokit construction in the CI nudge and PR triage scripts.
Stale action revision
.github/workflows/stale.yml
Updates the pinned actions/stale revision from v10.3.0 to v10.4.0.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: ruili-testsprite

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/github-script-v8-public

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Test Coverage Report

Metric Coverage
Lines 86.77%
Statements 86.77%
Functions 81.15%
Branches 85.45%

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.

2 participants