From c1f004ee9d58ec3919ba34a601c1db1c392f1d0e Mon Sep 17 00:00:00 2001 From: Levente Balogh Date: Tue, 14 Dec 2021 11:36:45 +0100 Subject: [PATCH] chore: delete the comment if there are no breaking changes --- .github/workflows/detect-breaking-changes.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/detect-breaking-changes.yml b/.github/workflows/detect-breaking-changes.yml index 0851824fa25..0a1bb17533a 100644 --- a/.github/workflows/detect-breaking-changes.yml +++ b/.github/workflows/detect-breaking-changes.yml @@ -48,7 +48,7 @@ jobs: uses: jwalton/gh-find-current-pr@v1 id: finder - - name: Comment on PR (if there are breaking changes) + - name: Comment on PR if: ${{ env.BREAKING_CHANGES_IS_BREAKING == '1' || env.BREAKING_CHANGES_IS_BREAKING == 1 }} uses: marocchino/sticky-pull-request-comment@v2 with: @@ -62,6 +62,12 @@ jobs: [Check console output](${{steps.get-job-link.outputs.result}}) + - name: Remove comment on PR + if: ${{ env.BREAKING_CHANGES_IS_BREAKING == '0' || env.BREAKING_CHANGES_IS_BREAKING == 0 }} + uses: marocchino/sticky-pull-request-comment@v2 + with: + delete: true + - name: Add label (if there are breaking changes) if: ${{ env.BREAKING_CHANGES_IS_BREAKING == '1' || env.BREAKING_CHANGES_IS_BREAKING == 1 }} uses: actions/github-script@v5