You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: stop auto-assign from failing on a bad maintainer token
Every contributor comment that reached the API calls turned into a red run
on main with `401 Bad credentials` — the MAINTAINER_GH_TOKEN secret has
expired. Fall back to the built-in GITHUB_TOKEN (the job already declares
`issues: write`, which covers search, timeline reads, assign and comment),
and treat assignment failures as warnings rather than job failures, since
auto-assignment is a convenience and not a gate.
Also bump actions/github-script v7 -> v9 to clear the Node 20 deprecation
warning and match stellopay-core.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
body: `Thanks for the interest, @${commenter}! You currently have ${uncoveredCount} assigned issues in this repo with no PR up yet, which is the cap (${MAX_ASSIGNED_PER_REPO}) for this project. Please open a PR for one of them (or release it) before taking on another — issues you've already submitted a PR for don't count against this.`,
77
+
});
78
+
return;
79
+
}
38
80
39
-
// Only issues with NO open-or-merged pull request count against the cap —
40
-
// a PR that's still open (in review) or already merged means the assignee
41
-
// is clearly active/delivering, so it shouldn't count. A PR that was closed
42
-
// WITHOUT merging represents abandoned work and still counts toward the cap.
body: `Thanks for the interest, @${commenter}! You currently have ${uncoveredCount} assigned issues in this repo with no PR up yet, which is the cap (${MAX_ASSIGNED_PER_REPO}) for this project. Please open a PR for one of them (or release it) before taking on another — issues you've already submitted a PR for don't count against this.`,
92
+
body: `Assigned @${commenter} to this issue. Please open a PR referencing this issue (e.g. \`Closes #${issue.number}\`) when you're ready. If you have questions along the way, feel free to join our contributor chat: https://t.me/+vTbe0hOUKrFhNTJl`,
69
93
});
70
-
return;
94
+
} catch (err) {
95
+
core.warning(`Auto-assign for @${commenter} on #${issue.number} did not complete (${err.status || "no status"}): ${err.message}`);
71
96
}
72
-
73
-
await github.rest.issues.addAssignees({
74
-
owner: context.repo.owner,
75
-
repo: context.repo.repo,
76
-
issue_number: issue.number,
77
-
assignees: [commenter],
78
-
});
79
-
80
-
await github.rest.issues.createComment({
81
-
owner: context.repo.owner,
82
-
repo: context.repo.repo,
83
-
issue_number: issue.number,
84
-
body: `Assigned @${commenter} to this issue. Please open a PR referencing this issue (e.g. \`Closes #${issue.number}\`) when you're ready. If you have questions along the way, feel free to join our contributor chat: https://t.me/+vTbe0hOUKrFhNTJl`,
0 commit comments