Commit 7c8c162375

7c8c162375cfaca50de685bed587390be7047e6e

parent: 7d20156cad

Unregistered key

Alicia Sykes <alicia@omg.lol> · 2022-07-29 21:20 UTC
committer: <noreply@github.com>

Adds action to prevent un-named PRs

Layout: unified · split

.github/workflows/lint-pr-title.yml added +30
@@ -0,0 +1,30 @@
1# Checks that PR title conform to contributing standards (or at least !== Update README.md)
2name: ⛳ Lint PR Title
3on:
4 pull_request:
5 types: [opened, edited, synchronize, reopened]
6jobs:
7 check-title:
8 runs-on: ubuntu-latest
9 steps:
10 - name: Check title prefix
11 uses: deepakputhraya/action-pr-title@v1.0.2
12 with:
13 allowed_prefixes: 'Adds,Add,Removes,Remove,Updates,Update,Fixes,Fix,Amends,[AUTO]' # title should start with the given prefix
14 disallowed_prefixes: 'Update README.md' # title should not start with the given prefix
15 prefix_case_sensitive: false # title prefix are case insensitive
16 min_length: 18 # Min length of the title
17 max_length: 60 # Max length of the title
18 github_token: ${{ secrets.BOT_GITHUB_TOKEN || github.token }}
19 - name: Check title regex
20 uses: morrisoncole/pr-lint-action@v1.6.1
21 with:
22 title-regex: "^(?!.*Update README.md).*"
23 on-failed-regex-fail-action: true
24 on-failed-regex-request-changes: true
25 on-failed-regex-create-review: true
26 on-failed-regex-comment: |
27 It looks like your title isn't very descriptive...
28 Please check the [contributing docs](https://github.com/Lissy93/awesome-privacy/blob/main/.github/CONTRIBUTING.md) before submitting a pull request.
29 on-succeeded-regex-dismiss-review-comment: ""
30 repo-token: "${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}"