This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (42 loc) · 1.92 KB
/
chatops-rebase.yml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Automatic Rebase
on:
issue_comment:
types: [created]
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'CONTRIBUTOR')
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
debug:
runs-on: ubuntu-latest
steps:
- if: github.event.issue.pull_request == ''
run: echo 'Not pull request'
- if: contains(github.event.comment.body, '/rebase')
run: echo 'Comment body contains /rebase'
- if: github.event.comment.author_association == 'COLLABORATOR'
run: echo 'Comment author COLLABORATOR'
- if: github.event.comment.author_association == 'CONTRIBUTOR'
run: echo 'Comment author CONTRIBUTOR'
- if: github.event.comment.author_association == 'FIRST_TIMER'
run: echo 'Comment author FIRST_TIMER'
- if: github.event.comment.author_association == 'FIRST_TIME_CONTRIBUTOR'
run: echo 'Comment author FIRST_TIME_CONTRIBUTOR'
- if: github.event.comment.author_association == 'MANNEQUIN'
run: echo 'Comment author MANNEQUIN'
- if: github.event.comment.author_association == 'MEMBER'
run: echo 'Comment author MEMBER'
- if: github.event.comment.author_association == 'NONE'
run: echo 'Comment author NONE'
- if: github.event.comment.author_association == 'OWNER'
run: echo 'Comment author OWNER'