Skip to content

Commit

Permalink
feat(ci): check and fast-forward merge PRs
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Smith <[email protected]>
  • Loading branch information
cameronraysmith committed Mar 22, 2024
1 parent 266a940 commit 251e11f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR Check Fast-forward
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
check-fast-forward:
runs-on: ubuntu-latest

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

steps:
- name: check fast-forward merge is possible
uses: sequoia-pgp/fast-forward@042cd23fbf9d5ed1400497a106c8abe4b45408ab # ratchet:sequoia-pgp/fast-forward@main
with:
merge: false
comment: on-error
20 changes: 20 additions & 0 deletions .github/workflows/pr-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR Fast-forward Merge
on:
issue_comment:
types: [created, edited]
jobs:
fast-forward:
if: ${{ contains(github.event.comment.body, '/fast-forward') && 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@042cd23fbf9d5ed1400497a106c8abe4b45408ab # ratchet:sequoia-pgp/fast-forward@main
with:
merge: true
comment: on-error

0 comments on commit 251e11f

Please sign in to comment.