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
Instead of automatically closing duplicate issues, the workflow now: - Logs URLs of issues that would have been closed - Runs in dry run mode for safety - Preserves all detection logic but skips actual closing actions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
| @@ -1,5 +1,5 @@ | ||
| 1 | -name: Auto-close duplicate issues | |
| 2 | -description: Auto-close issues marked as duplicates after 3 days if no response | |
| 1 | +name: Auto-close duplicate issues (DRY RUN) | |
| 2 | +description: Dry run - logs issues that would be auto-closed as duplicates after 3 days if no response | |
| 3 | 3 | on: |
| 4 | 4 | schedule: |
| 5 | 5 | - cron: '0 9 * * *' |
| @@ -72,24 +72,7 @@ | ||
| 72 | 72 | |
| 73 | 73 | if (authorThumbsDown) continue; |
| 74 | 74 | |
| 75 | - // Auto-close the issue as duplicate | |
| 76 | - await github.rest.issues.update({ | |
| 77 | - owner: context.repo.owner, | |
| 78 | - repo: context.repo.repo, | |
| 79 | - issue_number: issue.number, | |
| 80 | - state: 'closed', | |
| 81 | - state_reason: 'duplicate' | |
| 82 | - }); | |
| 83 | - | |
| 84 | - // Add closing comment | |
| 85 | - await github.rest.issues.createComment({ | |
| 86 | - owner: context.repo.owner, | |
| 87 | - repo: context.repo.repo, | |
| 88 | - issue_number: issue.number, | |
| 89 | - body: `This issue has been automatically closed as a duplicate after 3 days with no response. If this was closed in error, please reopen it. | |
| 90 | - | |
| 91 | -🤖 Generated with Claude Code` | |
| 92 | - }); | |
| 93 | - | |
| 94 | - console.log(`Auto-closed issue #${issue.number} as duplicate`); | |
| 75 | + // DRY RUN: Log the issue that would be auto-closed | |
| 76 | + const issueUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/issues/${issue.number}`; | |
| 77 | + console.log(`[DRY RUN] Would auto-close issue #${issue.number} as duplicate: ${issueUrl}`); | |
| 95 | 78 | } |