We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e0f461 commit 3dd5b99Copy full SHA for 3dd5b99
.github/workflows/dependabot-auto-merge.yml
@@ -1,5 +1,8 @@
1
name: Dependabot auto-merge
2
-on: pull_request_target
+on:
3
+ pull_request:
4
+ check_suite:
5
+ types: [completed]
6
7
permissions:
8
pull-requests: write
@@ -82,8 +85,8 @@ jobs:
82
85
const statusResponse = await github.graphql(checkStatusQuery, repoInfo)
83
86
const checkState = statusResponse.repository.pullRequest.commits.nodes[0]?.commit?.statusCheckRollup?.state
84
87
- if (checkState !== 'SUCCESS') {
- console.log('Status checks are not successful yet. Current state:', checkState)
88
+ if (checkState === 'FAILURE' || checkState === 'ERROR') {
89
+ console.log('Status checks failed. Current state:', checkState)
90
core.setFailed('Status checks must pass before enabling auto-merge')
91
return
92
}
0 commit comments