chore: remove actions-cool/issues-helper - #7400
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/antvis/G2/sessions/afa0f6dd-9270-44e2-8dae-f325af82be28 Co-authored-by: interstellarmt <178904023+interstellarmt@users.noreply.github.com>
Agent-Logs-Url: https://github.com/antvis/G2/sessions/afa0f6dd-9270-44e2-8dae-f325af82be28 Co-authored-by: interstellarmt <178904023+interstellarmt@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
interstellarmt
May 19, 2026 03:58
View session
interstellarmt
marked this pull request as ready for review
May 19, 2026 03:59
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the third-party actions-cool/issues-helper GitHub Action (due to potential supply-chain risk) and replaces its functionality with first-party actions/github-script@v7.0.1 calls to the GitHub REST API.
Changes:
- Replaced the “mark duplicate” helper action with an inline
github-scriptimplementation that detects/duplicate, applies labels, and closes the issue. - Replaced multiple label-management helper steps with inline
github-scriptsteps that add labels, create issue comments, add reactions, and close issues.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/mark-duplicate.yml | Replaces the mark-duplicate action with a github-script step that labels/closes on /duplicate. |
| .github/workflows/manage-labeled.yml | Replaces multiple issues-helper steps with github-script for label/comment/reaction/close automation. |
Comments suppressed due to low confidence (2)
.github/workflows/mark-duplicate.yml:28
issue_commentalso fires for PRs; without a guard this will label/close pull requests when someone comments/duplicate. Consider skipping whencontext.payload.issue.pull_requestis present (or otherwise ensure this only targets issues).
const issueNumber = context.issue.number;
const owner = context.repo.owner;
const repo = context.repo.repo;
// Add 'duplicate' label
await github.rest.issues.addLabels({ owner, repo, issue_number: issueNumber, labels: ['duplicate'] });
.github/workflows/mark-duplicate.yml:35
- This workflow removes
waiting for maintainerand also adds theduplicatelabel, which triggersmanage-labeled.yml(it removeswaiting for maintainerwhenduplicateis added). That other workflow’s removal path isn’t 404-tolerant, so these two can race and make one workflow fail. Consider removing the label-removal from one place (single source of truth) or ensure the other workflow ignores 404s when removing the label.
// Add 'duplicate' label
await github.rest.issues.addLabels({ owner, repo, issue_number: issueNumber, labels: ['duplicate'] });
// Remove 'waiting for maintainer' label if present
try {
await github.rest.issues.removeLabel({ owner, repo, issue_number: issueNumber, name: 'waiting for maintainer' });
} catch (e) {
if (e.status !== 404) throw e;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
actions-cool/issues-helperis potentially compromised and should not be trusted in CI. All usages are replaced with the first-partyactions/github-script@v7.0.1calling GitHub REST API directly.Changes
manage-labeled.yml— replaced 8 steps usingactions-cool/issues-helper(add-labels,create-comment,close-issue) with inlinegithub-scriptcalls usinggithub.rest.issues.*andgithub.rest.reactions.*mark-duplicate.yml— replacedmark-duplicateaction with agithub-scriptstep that detects/duplicatecomments, applies theduplicatelabel, stripswaiting for maintainer, and closes the issue