-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.15 KB
/
auto_merge.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
45
46
47
name: Auto Merge
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
run_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check for code factor
run: |
# Add your code factor check command here
echo "Code factor check passed"
- name: Check for conflicts with base branch
run: |
git fetch origin
git checkout ${{ github.event.pull_request.base.ref }}
git merge --no-commit --no-ff ${{ github.event.pull_request.head.ref }}
git merge --abort || exit 1
auto_merge:
needs: run_checks
runs-on: ubuntu-latest
if: success()
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Merge pull request
uses: pascalgn/automerge-action@v0.14.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}