-
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (80 loc) · 2.48 KB
/
pr-management.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# @format
---
name: Pull Request Management
on:
pull_request:
- opened
- reopened
- ready_for_review
- edited
- synchronize
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
steps:
- uses: hmarr/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: ahmadnassri/action-dependabot-auto-merge@v1
with:
github-token: ${{ github.token }}
target: minor
tag-dirty-prs:
runs-on: ubuntu-latest
steps:
- name: Checks to see if PRs are dirty
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: "Cannot Be Merged"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "Please resolve the conflicts with the target branch."
commentOnClean: "Conflicts have been resolved."
size-label:
runs-on: ubuntu-latest
steps:
- name: Assign size label
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
stats:
runs-on: ubuntu-latest
steps:
- name: Run pull request stats
uses: flowwer-dev/pull-request-stats@v1
with:
period: 180
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow --tags
- uses: snyk/[email protected]
with:
releaseBranch: ${{ github.base_ref }}
env:
GITHUB_PR_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
lint-title:
runs-on: ubuntu-latest
steps:
- uses: aslafy-z/conventional-pr-title-action@master
with:
success-state: Title follows the Conentional Commits specification.
failure-state: Update the PR title to match Conventional Commits
context-name: conventional-pr-title
preset: conventional-changelog-conventionalcommits@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
format:
runs-on: ubuntu-latest
name: Apply code formatting
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow --tags
- run: npx prettier --write .
- run: npx eslint --fix --ext .js,.ts ./src
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply ESlint fixes and Prettier formatting