Skip to content

Commit 9323308

Browse files
committed
cicd: auto-merge approved dependabot PRs
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
1 parent 503776f commit 9323308

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/fast-forward.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,21 @@ name: Fast Forward
33
on:
44
issue_comment:
55
types: [created, edited]
6+
pull_request_review:
7+
types: [submitted]
68
jobs:
79
fast-forward:
8-
# Only run if the comment contains the /fast-forward command.
9-
if: ${{ contains(github.event.comment.body, '/fast-forward')
10-
&& github.event.issue.pull_request }}
10+
# Only run if the comment or approval contains the /fast-forward command,
11+
# or if it was a dependabot PR.
12+
if: >-
13+
${{
14+
( github.event.issue.pull_request && contains(github.event.comment.body, '/fast-forward')) ||
15+
(
16+
github.event.review && github.event.review.state == 'approved' && (
17+
github.event.pull_request.user.url == 'https://api.github.com/users/dependabot%5Bbot%5D' ||
18+
contains(github.event.review.body, '/fast-forward')
19+
))
20+
}}
1121
runs-on: ubuntu-latest
1222

1323
permissions:

0 commit comments

Comments
 (0)