diff --git a/.github/workflows/pre-commit-status.yml b/.github/workflows/pre-commit-status.yml index 194ab1c8255..afd52fdcb5e 100644 --- a/.github/workflows/pre-commit-status.yml +++ b/.github/workflows/pre-commit-status.yml @@ -131,3 +131,24 @@ jobs: gh pr edit ${{ steps.pr-info.outputs.pr_number }} --repo ${{ github.repository }} --remove-label 'Status: Pre-commit fixes required ⚠️' env: GH_TOKEN: ${{ github.token }} + + - name: Comment on PR about pre-commit failures + if: | + steps.pr-info.outputs.artifacts_found == 'true' && + steps.pr-info.outputs.pre_commit_outcome == 'failure' && + steps.pr-info.outputs.pending_commit == '0' + uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 + with: + pr-number: ${{ steps.pr-info.outputs.pr_number }} + message: | + ## ⚠️ Pre-commit Hooks Failed + + Some pre-commit hooks failed and require manual fixes. Please see the detailed error report below. + + **What to do:** + 1. 📋 [**View the detailed error report**](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}) to see which hooks failed + 2. 🔧 Fix the issues locally in your code + 3. 💾 Commit and push your changes + 4. 🔄 The hooks will run again automatically + + **Need help?** Ask in the comments below.