File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -49,21 +49,22 @@ jobs:
49
49
git config --global user.name "Port Claude AI"
50
50
git config --global user.email "port-claude-ai@port.io"
51
51
52
- - name : Find Last Claude Comment
53
- uses : peter-evans/find-comment@v3
54
- id : find-comment
55
- with :
56
- issue-number : ${{ github.event.pull_request.number }}
57
- comment-author : ' claude'
58
- direction : last
59
-
60
- - name : Delete Last Claude Comment
61
- if : steps.find-comment.outputs.comment-id != ''
52
+ - name : Find and Delete Last Claude Comment
62
53
env :
63
54
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64
55
run : |
65
- gh api repos/${{ github.repository }}/issues/comments/${{ steps.find-comment.outputs.comment-id }} -X DELETE
66
- echo "Deleted last Claude comment ID: ${{ steps.find-comment.outputs.comment-id }}"
56
+ echo "Looking for the last Claude comment to delete..."
57
+
58
+ # Get the last Claude comment ID (trying common patterns)
59
+ last_claude_comment=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
60
+ --jq '.[] | select(.user.login | test("claude"; "i")) | .id' | tail -1)
61
+
62
+ if [ ! -z "$last_claude_comment" ]; then
63
+ echo "Deleting last Claude comment ID: $last_claude_comment"
64
+ gh api repos/${{ github.repository }}/issues/comments/$last_claude_comment -X DELETE
65
+ else
66
+ echo "No Claude comments found to delete"
67
+ fi
67
68
68
69
- name : Run Claude PR Action
69
70
uses : anthropics/claude-code-action@beta
You can’t perform that action at this time.
0 commit comments