Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/pr-classify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ jobs:
"summary": "<1-2 sentence plain English summary of what this PR does>"
}

- name: Delete classifier comment
if: always()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
COMMENTS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments)
COMMENT_ID=$(echo "$COMMENTS" | jq '[.[] | select(.user.login == "github-actions[bot]" and (.body | test("\"type\":")))][0].id')
if [ "$COMMENT_ID" != "null" ] && [ -n "$COMMENT_ID" ]; then
gh api -X DELETE repos/${{ github.repository }}/issues/comments/$COMMENT_ID
fi

- name: Apply labels and post comment
if: always()
uses: actions/github-script@v7
Expand Down
Loading