Skip to content

Commit d86ae2f

Browse files
authored
Merge pull request #1847 from Kobzol/edit-comment
Simplify comment implementation in dry-run
2 parents a76e62d + 4693f44 commit d86ae2f

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

.github/workflows/dry-run.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,6 @@ jobs:
166166
run: |
167167
PR=${PR_NUMBER}
168168
echo "Pull request ${PR}"
169-
170-
# --edit-last doesn't work if there is no previous comment, so we have to figure out
171-
# if we should create a comment or not
172-
if gh issue view ${PR} --repo rust-lang/team --json comments \
173-
--jq '.comments.[].author.login' | grep --quiet --fixed-strings "github-actions"; then
174-
echo "Editing comment"
175-
gh pr comment ${PR} --repo rust-lang/team --body-file comment.txt --edit-last
176-
else
177-
echo "Creating new comment"
178-
gh pr comment ${PR} --repo rust-lang/team --body-file comment.txt
179-
fi
169+
gh pr comment ${PR} --repo rust-lang/team --body-file comment.txt \
170+
--edit-last \
171+
--create-if-none

0 commit comments

Comments
 (0)