@@ -2,7 +2,7 @@ name: Pre-commit check
2
2
3
3
on :
4
4
pull_request :
5
- types : [opened, reopened, synchronize, labeled]
5
+ types : [opened, reopened, synchronize, labeled, unlabeled ]
6
6
7
7
jobs :
8
8
lint :
60
60
if : always()
61
61
with :
62
62
msg : " ci(pre-commit): Apply automatic fixes"
63
+
64
+ report-run :
65
+ name : Report that the PR is ready for merge
66
+ needs : lint
67
+ runs-on : ubuntu-latest
68
+ steps :
69
+ - name : Report success
70
+ if : |
71
+ contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge')
72
+ uses : actions/github-script@v7
73
+ with :
74
+ github-token : ${{ secrets.GITHUB_TOKEN }}
75
+ script : |
76
+ github.rest.repos.createCommitStatus({
77
+ owner: context.repo.owner,
78
+ repo: context.repo.repo,
79
+ sha: context.sha,
80
+ state: 'success',
81
+ context: 'pre-commit-result',
82
+ description: 'All pre-commit checks passed',
83
+ });
84
+
85
+ - name : Report pending
86
+ if : |
87
+ !contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge')
88
+ uses : actions/github-script@v7
89
+ with :
90
+ github-token : ${{ secrets.GITHUB_TOKEN }}
91
+ script : |
92
+ github.rest.repos.createCommitStatus({
93
+ owner: context.repo.owner,
94
+ repo: context.repo.repo,
95
+ sha: context.sha,
96
+ state: 'pending',
97
+ context: 'pre-commit-result',
98
+ description: 'Pre-commit checks need to pass before merging',
99
+ });
0 commit comments