1
0
Fork 0
privacy/.github/workflows/ticket-check.yml

41 lines
1.7 KiB
YAML
Raw Normal View History

2022-07-31 17:07:16 +01:00
# Checks newly opened issues contain enough info, and follow the required format
name: 🎫 Issue Validator
2022-07-26 12:34:20 +01:00
on:
issues:
types: [opened, edited]
2022-07-26 12:34:20 +01:00
jobs:
2022-07-31 17:07:16 +01:00
check-title:
2022-07-26 12:34:20 +01:00
runs-on: ubuntu-latest
2022-07-31 17:07:16 +01:00
permissions: write-all
2022-07-26 12:34:20 +01:00
steps:
- name: Check Default Title
2022-07-31 17:07:16 +01:00
if: "endsWith(github.event.issue.title, '<title>')"
uses: peter-evans/create-or-update-comment@v2
2022-07-26 12:34:20 +01:00
with:
2022-07-31 17:07:16 +01:00
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
2022-07-31 17:19:55 +01:00
issue-number: ${{ github.event.issue.number }}
2022-07-31 17:07:16 +01:00
body: |
Please ensure that your ticket has an appropriate title
- name: Check Title Contains Categroy
if: "!(startsWith(github.event.issue.title, '[') && contains(github.event.issue.title, ']'))"
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Please ensure that your ticket's title is preceded with a category.
For example, `[ADDITION]`, `[AMENDMENT]`, `[REMOVAL]` or `[QUESTION]`.
- name: Check Quality Checklist
if: "contains(github.event.issue.body, '[ ]') || !(contains(github.event.issue.body, '[X]') || contains(github.event.issue.body, '[x]'))"
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Please ensure that you've followed the issue template fully.
It's important that you complete the quality & transparency checklist.