Skip to content

Commit

Permalink
ci: add PR fast-forward merge workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
haatveit committed Jul 8, 2024
1 parent 32e2558 commit 3a01e7e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr-merge-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull request mergability check
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
check-pr-ff-merge:
runs-on: ubuntu-latest

permissions:
contents: read
pull-requests: write
issues: write

steps:
- name: Checking if fast forward merging is possible
uses: sequoia-pgp/fast-forward@v1
with:
merge: false
comment: always
24 changes: 24 additions & 0 deletions .github/workflows/pr-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull request merge
on:
issue_comment:
types: [created, edited]
jobs:
pr-ff-merge:
# Only run if the comment contains a fast-forward triggering command.
if: ${{ ( contains(github.event.comment.body, '/fast-forward') ||
contains(github.event.comment.body, '!ff') ||
contains(github.event.comment.body, '!merge') )
&& github.event.issue.pull_request }}
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
issues: write

steps:
- name: Fast forward merge
uses: sequoia-pgp/fast-forward@v1
with:
merge: true
comment: always

0 comments on commit 3a01e7e

Please sign in to comment.