Skip to content

Commit 598ba54

Browse files
authored
Make the validate-skip-qa action update the comment if it has been posted already (DataDog#21271)
* Make the validate-skip-qa action update the comment if it has been posted already * Trigger action * Trigger update * Trigger update * Use replace as edit mode * Revert changes that triggered the comments * Move the action back to pr target
1 parent 6ce9c23 commit 598ba54

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/validate-skip-qa.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,13 @@ jobs:
100100
id: find_comment_remove_label
101101
with:
102102
issue-number: ${{ github.event.pull_request.number }}
103-
body-includes: ${{ steps.construct_remove_label_comment.outputs.body }}
103+
body-includes: "⚠️ **The `qa/skip-qa` label has been added with shippable changes**"
104104

105105
- name: Post comment - Remove skip qa label
106-
if: steps.changed_files.outputs.any_changed == 'true' && contains(github.event.pull_request.labels.*.name, 'qa/skip-qa') && steps.find_comment_remove_label.outputs.comment-id == ''
106+
if: steps.changed_files.outputs.any_changed == 'true' && contains(github.event.pull_request.labels.*.name, 'qa/skip-qa')
107107
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
108108
with:
109109
issue-number: ${{ github.event.pull_request.number }}
110110
body: ${{ steps.construct_remove_label_comment.outputs.body }}
111+
comment-id: ${{ steps.find_comment_remove_label.outputs.comment-id }}
112+
edit-mode: "replace"

0 commit comments

Comments
 (0)