Commit e535c56fe6
Unregistered key
Layout: unified · split
.github/workflows/lint-pr-title.yml deleted −53
| @@ -1,53 +0,0 @@ | |||
| 1 | # Checks that PR title conform to contributing standards (or at least !== Update README.md) | ||
| 2 | name: ⛳ Lint PR | ||
| 3 | on: | ||
| 4 | pull_request: | ||
| 5 | types: [opened, edited, synchronize, reopened] | ||
| 6 | jobs: | ||
| 7 | check-title: | ||
| 8 | permissions: write-all | ||
| 9 | runs-on: ubuntu-latest | ||
| 10 | steps: | ||
| 11 | - name: Check title regex | ||
| 12 | uses: morrisoncole/pr-lint-action@v1.6.1 | ||
| 13 | with: | ||
| 14 | title-regex: "^(?!.*Update README.md).*" | ||
| 15 | on-failed-regex-fail-action: true | ||
| 16 | on-failed-regex-request-changes: true | ||
| 17 | on-failed-regex-create-review: true | ||
| 18 | on-failed-regex-comment: | | ||
| 19 | It looks like your title isn't very descriptive... | ||
| 20 | Please check the [contributing docs](https://github.com/Lissy93/awesome-privacy/blob/main/.github/CONTRIBUTING.md) before submitting a pull request. | ||
| 21 | on-succeeded-regex-dismiss-review-comment: "" | ||
| 22 | repo-token: "${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}" | ||
| 23 | |||
| 24 | - name: Check title prefix | ||
| 25 | uses: deepakputhraya/action-pr-title@v1.0.2 | ||
| 26 | with: | ||
| 27 | allowed_prefixes: 'Adds,Add,Removes,Remove,Updates,Update,Fixes,Fix,Amends,[AUTO]' # title should start with the given prefix | ||
| 28 | disallowed_prefixes: 'Update README.md' # title should not start with the given prefix | ||
| 29 | prefix_case_sensitive: false # title prefix are case insensitive | ||
| 30 | min_length: 18 # Min length of the title | ||
| 31 | max_length: 60 # Max length of the title | ||
| 32 | github_token: ${{ secrets.BOT_GITHUB_TOKEN || github.token }} | ||
| 33 | |||
| 34 | |||
| 35 | - name: Check body includes tickboxes | ||
| 36 | uses: mtfoley/pr-compliance-action@main | ||
| 37 | with: | ||
| 38 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || github.token }} | ||
| 39 | ignore-authors: liss-bot | ||
| 40 | ignore-team-members: false | ||
| 41 | base-comment: '' | ||
| 42 | body-regex: "(\\[x]|\\[X]).(?!.*(\\[]|\\[ ])).*" | ||
| 43 | body-fail: true | ||
| 44 | body-auto-close: false | ||
| 45 | body-comment: | | ||
| 46 | You must complete the quality and transparency checklist. | ||
| 47 | protected-branch: '' | ||
| 48 | protected-branch-auto-close: false | ||
| 49 | protected-branch-comment: '' | ||
| 50 | title-check-enable: false | ||
| 51 | title-comment: '' | ||
| 52 | watch-files: '' | ||
| 53 | watch-files-comment: '' | ||
.github/workflows/validate-pr.yml added +88
| @@ -0,0 +1,88 @@ | |||
| 1 | # Checks that PR title conform to contributing standards (or at least !== Update README.md) | ||
| 2 | name: ⛳ Validate PR | ||
| 3 | on: | ||
| 4 | pull_request: | ||
| 5 | types: [opened, edited, synchronize, reopened] | ||
| 6 | |||
| 7 | env: | ||
| 8 | BASE_MSG: >+ | ||
| 9 | Thanks for contributing to Awesome-Privacy! Your pull request will be reviewed shortly. | ||
| 10 | |||
| 11 | In the meantime, please be sure that you have read, and complied with the guidelines outlined in the | ||
| 12 | [Contributing Docs](https://github.com/Lissy93/awesome-privacy/blob/main/.github/CONTRIBUTING.md). | ||
| 13 | |||
| 14 | jobs: | ||
| 15 | validate: | ||
| 16 | permissions: write-all | ||
| 17 | runs-on: ubuntu-latest | ||
| 18 | steps: | ||
| 19 | - name: Validate Title is not Default | ||
| 20 | if: "contains(github.event.pull_request.title, 'Update README.md')" | ||
| 21 | uses: peter-evans/create-or-update-comment@v2 | ||
| 22 | with: | ||
| 23 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 24 | issue-number: ${{ github.event.pull_request.number }} | ||
| 25 | body: | | ||
| 26 | Hi @${{ github.actor }}, | ||
| 27 | Please update your pull request, to include a more descriptive title. | ||
| 28 | |||
| 29 | - name: Validate Checklist is Completed | ||
| 30 | if: > | ||
| 31 | contains(github.event.pull_request.body, '[ ]') || | ||
| 32 | !(contains(github.event.pull_request.body, '[X]') || contains(github.event.pull_request.body, '[x]')) | ||
| 33 | uses: peter-evans/create-or-update-comment@v2 | ||
| 34 | with: | ||
| 35 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 36 | issue-number: ${{ github.event.pull_request.number }} | ||
| 37 | body: | | ||
| 38 | Hello @${{ github.actor }} 👋 | ||
| 39 | ${{ env.BASE_MSG }} | ||
| 40 | ⚠️ It looks like you've not complete the quality and transparency checklist. | ||
| 41 | |||
| 42 | - name: Validate Affiliation Section is Present | ||
| 43 | if: > | ||
| 44 | !contains(github.event.pull_request.body, 'Affiliation') | ||
| 45 | uses: peter-evans/create-or-update-comment@v2 | ||
| 46 | with: | ||
| 47 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 48 | issue-number: ${{ github.event.pull_request.number }} | ||
| 49 | body: | | ||
| 50 | Hello @${{ github.actor }} 👋 | ||
| 51 | ${{ env.BASE_MSG }} | ||
| 52 | ⚠️ You must indicate if you are affiliated with any software modified by this PR. | ||
| 53 | If not applicable, you may set this field to N/A. | ||
| 54 | |||
| 55 | - name: Validate Category | ||
| 56 | if: > | ||
| 57 | contains(github.event.pull_request.body, 'Addition / Amendment / Removal / Spelling or Grammar / Website Update / Misc') || | ||
| 58 | !( | ||
| 59 | contains(github.event.pull_request.body, 'Addition') || | ||
| 60 | contains(github.event.pull_request.body, 'Amendment') || | ||
| 61 | contains(github.event.pull_request.body, 'Removal') || | ||
| 62 | contains(github.event.pull_request.body, 'Spelling or Grammar') || | ||
| 63 | contains(github.event.pull_request.body, 'Website Update') || | ||
| 64 | contains(github.event.pull_request.body, 'Misc') | ||
| 65 | ) | ||
| 66 | uses: peter-evans/create-or-update-comment@v2 | ||
| 67 | with: | ||
| 68 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 69 | issue-number: ${{ github.event.pull_request.number }} | ||
| 70 | body: | | ||
| 71 | Hello @${{ github.actor }} 👋 | ||
| 72 | ${{ env.BASE_MSG }} | ||
| 73 | ⚠️ You must specify a category | ||
| 74 | Either: `Addition`, `Amendment`, `Removal`, `Spelling or Grammar`, `Website Update`, or `Misc`. | ||
| 75 | |||
| 76 | - name: Validate Supporting Material is Present | ||
| 77 | if: > | ||
| 78 | !contains(github.event.pull_request.body, 'Supporting Material') | ||
| 79 | uses: peter-evans/create-or-update-comment@v2 | ||
| 80 | with: | ||
| 81 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
| 82 | issue-number: ${{ github.event.pull_request.number }} | ||
| 83 | body: | | ||
| 84 | Hello @${{ github.actor }} 👋 | ||
| 85 | ${{ env.BASE_MSG }} | ||
| 86 | ⚠️ If applicable, please ensure you've provided supporting material. | ||
| 87 | |||
| 88 | |||