Skip to content

Commit 5585170

Browse files
ci: remove success message from formatting check (#858)
* ci: remove success message from formatting check The workflow succeeds giving a green check-mark next to the commit id. Perhaps writing a comment each time is redundant? E.g.: #856 * Update spotless check workflow to handle failures Modify condition for PR comment action to run only on failure.
1 parent a614e35 commit 5585170

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/spotless-check.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ jobs:
2020
- name: spotless:check
2121
run: mvn spotless:check
2222
- uses: mshick/add-pr-comment@v2
23-
if: always()
23+
# Only run if the previous step failed
24+
if: failure() && steps.spotless_check.outcome == 'failure'
2425
with:
2526
proxy-url: https://slack-bots.azure.smilecdr.com/robogary/github
2627
message-success: |
27-
Formatting check succeeded!
28+
Formatting check succeeded! This should never run, because the step is skipped on workflow success.
2829
message-failure: |
2930
**This Pull Request has failed the formatting check**
3031

0 commit comments

Comments
 (0)