-
Notifications
You must be signed in to change notification settings - Fork 1
26 lines (24 loc) · 1.15 KB
/
fast-forward.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# This a small action to perform fast forward merging which is not supported by github by default.
# NB: since this by default is run using the default GITHUB_TOKEN it will not trigger subsequent work-flows.
# In order for this to be effective either a PAT or a github app (dependabot) should be setup
name: Fast Forward PR
on:
issue_comment:
types: [created]
jobs:
fast_forward_job:
name: Fast Forward
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/fast-forward')
runs-on: ubuntu-latest
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
uses: actions/checkout@v2
# Basic use case example
- name: Fast Forward PR
id: ff-action
uses: endre-spotlab/fast-forward-js-action@2.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
success_message: 'Success! Fast forwarded ***target_base*** to ***source_head***! ```git checkout target_base && git merge source_head --ff-only``` '
failure_message: 'Failed! Cannot do fast forward! - try merging the target back into source first.'