File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -131,3 +131,34 @@ jobs:
131131 gh pr edit ${{ steps.pr-info.outputs.pr_number }} --repo ${{ github.repository }} --remove-label 'Status: Pre-commit fixes required ⚠️'
132132 env :
133133 GH_TOKEN : ${{ github.token }}
134+
135+ - name : Comment on PR about pre-commit failures
136+ if : |
137+ steps.pr-info.outputs.artifacts_found == 'true' &&
138+ steps.pr-info.outputs.pre_commit_outcome == 'failure' &&
139+ steps.pr-info.outputs.pending_commit == '0'
140+ uses : thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
141+ with :
142+ pr-number : ${{ steps.pr-info.outputs.pr_number }}
143+ comment-tag : pre-commit-failure
144+ message : |
145+ ## ⚠️ Pre-commit Hooks Failed
146+
147+ Some pre-commit hooks failed and require manual fixes.
148+
149+ **What to do:**
150+ 1. 🔧 Fix the issues locally in your code
151+ 2. 💾 Commit and push your changes
152+ 3. 🔄 The hooks will run again automatically
153+
154+ [🔗 View detailed error log](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }})
155+
156+ - name : Remove pre-commit failure comment if resolved
157+ if : |
158+ steps.pr-info.outputs.artifacts_found == 'true' &&
159+ steps.pr-info.outputs.pre_commit_outcome == 'success'
160+ uses : thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
161+ with :
162+ pr-number : ${{ steps.pr-info.outputs.pr_number }}
163+ comment-tag : pre-commit-failure
164+ mode : delete
You can’t perform that action at this time.
0 commit comments