File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Remove waiting-for-response tag
2+
3+ on :
4+ issue_comment :
5+ types : [created]
6+
7+ jobs :
8+ remove-tag :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Remove waiting-for-response label if present
12+ uses : actions/github-script@v6
13+ with :
14+ script : |
15+ const issue = context.payload.issue;
16+ if (!issue) {
17+ console.log("No issue or PR found in the payload.");
18+ return;
19+ }
20+ const labels = issue.labels.map(label => label.name);
21+ if (labels.includes("waiting-for-response")) {
22+ console.log(`Removing label 'waiting-for-response' from issue/PR #${issue.number}`);
23+ await github.issues.removeLabel({
24+ owner: context.repo.owner,
25+ repo: context.repo.repo,
26+ issue_number: issue.number,
27+ name: "waiting-for-response"
28+ });
29+ } else {
30+ console.log("Label 'waiting-for-response' not found on this issue/PR.");
31+ }
You can’t perform that action at this time.
0 commit comments