spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / .github / workflows / remove-autoclose-label.yml
42 lines · 1.4 KBRaw
1name: "Remove Autoclose Label on Activity"
2
3on:
4 issue_comment:
5 types: [created]
6
7permissions:
8 issues: write
9
10jobs:
11 remove-autoclose:
12 # Only run if the issue has the autoclose label
13 if: |
14 github.event.issue.state == 'open' &&
15 contains(github.event.issue.labels.*.name, 'autoclose') &&
16 github.event.comment.user.login != 'github-actions[bot]'
17 runs-on: ubuntu-latest
18 steps:
19 - name: Remove autoclose label
20 uses: actions/github-script@v7
21 with:
22 script: |
23 console.log(`Removing autoclose label from issue #${context.issue.number} due to new comment from ${context.payload.comment.user.login}`);
24
25 try {
26 // Remove the autoclose label
27 await github.rest.issues.removeLabel({
28 owner: context.repo.owner,
29 repo: context.repo.repo,
30 issue_number: context.issue.number,
31 name: 'autoclose'
32 });
33
34 console.log(`Successfully removed autoclose label from issue #${context.issue.number}`);
35 } catch (error) {
36 // If the label was already removed or doesn't exist, that's fine
37 if (error.status === 404) {
38 console.log(`Autoclose label was already removed from issue #${context.issue.number}`);
39 } else {
40 throw error;
41 }
42 }