From 611956def417e9897e84bab256ede25e8e6d5679 Mon Sep 17 00:00:00 2001 From: Boris Cherny Date: Tue, 5 Aug 2025 17:17:51 -0700 Subject: [PATCH] Convert auto-close duplicates workflow to dry run mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/auto-close-duplicates.yml | 27 ++++----------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/auto-close-duplicates.yml b/.github/workflows/auto-close-duplicates.yml index 455fc8d2a..bd48a3d66 100644 --- a/.github/workflows/auto-close-duplicates.yml +++ b/.github/workflows/auto-close-duplicates.yml @@ -1,5 +1,5 @@ -name: Auto-close duplicate issues -description: Auto-close issues marked as duplicates after 3 days if no response +name: Auto-close duplicate issues (DRY RUN) +description: Dry run - logs issues that would be auto-closed as duplicates after 3 days if no response on: schedule: - cron: '0 9 * * *' @@ -72,24 +72,7 @@ jobs: if (authorThumbsDown) continue; - // Auto-close the issue as duplicate - await github.rest.issues.update({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - state: 'closed', - state_reason: 'duplicate' - }); - - // Add closing comment - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - 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. - -🤖 Generated with Claude Code` - }); - - console.log(`Auto-closed issue #${issue.number} as duplicate`); + // DRY RUN: Log the issue that would be auto-closed + const issueUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/issues/${issue.number}`; + console.log(`[DRY RUN] Would auto-close issue #${issue.number} as duplicate: ${issueUrl}`); } \ No newline at end of file