Skip to content

Commit d305db0

Browse files
authored
Merge pull request #371 from ianlewis/365-feature-group-output-of-format-check-when-on-github
feat: group diff output on GitHub Actions
2 parents 5a162f4 + 1c7f926 commit d305db0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,13 @@ format-check: ## Check that files are properly formatted.
390390
exit_code=0; \
391391
if [ -n "$$(git diff)" ]; then \
392392
>&2 echo "Some files need to be formatted. Please run 'make format' and try again."; \
393+
if [ "$(OUTPUT_FORMAT)" == "github" ]; then \
394+
echo "::group::git diff"; \
395+
fi; \
393396
git --no-pager diff; \
397+
if [ "$(OUTPUT_FORMAT)" == "github" ]; then \
398+
echo "::endgroup::"; \
399+
fi; \
394400
exit_code=1; \
395401
fi; \
396402
git restore .; \

0 commit comments

Comments
 (0)