From caf7ffe56cf21314e67826ec91468bbff73fcb4d Mon Sep 17 00:00:00 2001 From: "dayuan.jiang" Date: Sat, 29 Nov 2025 01:21:44 +0900 Subject: [PATCH] Clean up outdated review comments before new review --- .github/workflows/claude-code.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/claude-code.yml b/.github/workflows/claude-code.yml index 7101be1..cec5505 100644 --- a/.github/workflows/claude-code.yml +++ b/.github/workflows/claude-code.yml @@ -62,6 +62,15 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} aws-region: us-east-1 + - name: Clean up outdated review comments + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Delete all previous review comments from github-actions bot + gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/comments \ + --jq '.[] | select(.user.login == "github-actions[bot]") | .id' | \ + xargs -I {} gh api repos/${{ github.repository }}/pulls/comments/{} -X DELETE 2>/dev/null || true + - name: Run Claude Code PR Review uses: anthropics/claude-code-action@v1 with: