Skip to content

Commit 864b358

Browse files
committed
ci: log CROSS_REPO_ISSUE_TOKEN presence on every run
Without this the job returns early whenever a PR body carries no cross-repo reference, so a repository that has the secret and one that does not produce byte-identical logs. Presence only; the value is never read into the log.
1 parent 6cc49d9 commit 864b358

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ jobs:
6262
'gi',
6363
);
6464
65+
// Report credential state on EVERY run, before any early return.
66+
// Otherwise a repository with the secret and one without look
67+
// identical until a cross-repo reference happens to show up —
68+
// which can be days — and "is it configured?" stays unanswerable.
69+
// Presence only; the value is never read into the log.
70+
const token = process.env.CROSS_REPO_TOKEN;
71+
core.info(
72+
`CROSS_REPO_ISSUE_TOKEN: ${token ? 'configured' : 'ABSENT — cross-repo closes will be reported, not performed'}`,
73+
);
74+
6575
const targets = new Map();
6676
for (const [, owner, repo, number] of body.matchAll(pattern)) {
6777
const key = `${owner}/${repo}#${number}`;
@@ -77,8 +87,6 @@ jobs:
7787
}
7888
core.info(`Cross-repo targets: ${[...targets.keys()].join(', ')}`);
7989
80-
const token = process.env.CROSS_REPO_TOKEN;
81-
8290
if (!token) {
8391
// Degrade VISIBLY. Someone has to close these by hand, and this
8492
// comment is the only thing that will tell them so.

0 commit comments

Comments
 (0)