Skip to content

Commit 9e8fe63

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/fix-cross-repo-closer-require
# Conflicts: # .github/workflows/cross-repo-issue-closer.yml
2 parents 82f8daf + dafb390 commit 9e8fe63

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
---
3+
4+
fix(ci): rename the cross-repo client — `github-script` already declares `octokit`
5+
6+
Release-nothing: touches `.github/workflows/cross-repo-issue-closer.yml` only.
7+
8+
`actions/github-script` injects an `octokit` binding into the script scope, so
9+
the `const octokit = require('@actions/github').getOctokit(token)` added in
10+
#4553 aborted the run before a single line of logic executed:
11+
12+
SyntaxError: Identifier 'octokit' has already been declared
13+
14+
This surfaced on #4553's own merge — the first time the workflow ever ran, and
15+
the first time any of its runtime behaviour was exercised. Until this lands,
16+
every merged pull request in this repository carries one red check.
17+
18+
The pre-merge validation missed it for an instructive reason. The script was
19+
syntax-checked against a hand-written wrapper declaring `{github, context,
20+
core, require}` — and a wrapper that omits an injected identifier cannot
21+
possibly see a collision with it. The check reported clean because it was
22+
asking a narrower question than the runtime asks. The wrapper now carries the
23+
full injected set, and the previous spelling fails it.

.github/workflows/cross-repo-issue-closer.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ jobs:
6767
);
6868
6969
// Report credential state on EVERY run, before any early return.
70+
// Otherwise a repository with the secret and one without look
71+
// identical until a cross-repo reference happens to show up —
72+
// which can be days — and "is it configured?" stays unanswerable.
73+
// Presence only; the value is never read into the log.
7074
const token = process.env.CROSS_REPO_TOKEN;
7175
core.info(
7276
`CROSS_REPO_ISSUE_TOKEN: ${token ? 'configured' : 'ABSENT — cross-repo closes will be reported, not performed'}`,

0 commit comments

Comments
 (0)