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
The 10-minute timeout is unnecessary for this workflow as it typically completes quickly. Removing it allows the workflow to use the default GitHub Actions timeout (6 hours for public repos, 72 hours for private), providing more flexibility if the workflow needs to process a large number of issues. Also fixed trailing whitespace inconsistencies in the script. 馃 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
| @@ -15,7 +15,6 @@ | ||
| 15 | 15 | jobs: |
| 16 | 16 | lock-closed-issues: |
| 17 | 17 | runs-on: ubuntu-latest |
| 18 | - timeout-minutes: 10 | |
| 19 | 18 | steps: |
| 20 | 19 | - name: Lock closed issues after 7 days of inactivity |
| 21 | 20 | uses: actions/github-script@v7 |
| @@ -23,13 +22,13 @@ | ||
| 23 | 22 | script: | |
| 24 | 23 | const sevenDaysAgo = new Date(); |
| 25 | 24 | sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7); |
| 26 | - | |
| 25 | + | |
| 27 | 26 | const lockComment = `This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.`; |
| 28 | - | |
| 27 | + | |
| 29 | 28 | let page = 1; |
| 30 | 29 | let hasMore = true; |
| 31 | 30 | let totalLocked = 0; |
| 32 | - | |
| 31 | + | |
| 33 | 32 | while (hasMore) { |
| 34 | 33 | // Get closed issues (pagination) |
| 35 | 34 | const { data: issues } = await github.rest.issues.listForRepo({ |
| @@ -89,5 +88,5 @@ | ||
| 89 | 88 | |
| 90 | 89 | page++; |
| 91 | 90 | } |
| 92 | - | |
| 91 | + | |
| 93 | 92 | console.log(`Total issues locked: ${totalLocked}`); |