2022-02-15 22:13:52 +00:00
|
|
|
name: PRCop
|
2022-01-20 18:31:06 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types:
|
2023-12-14 18:55:51 +00:00
|
|
|
- labeled
|
|
|
|
- unlabeled
|
2022-02-15 22:13:52 +00:00
|
|
|
- opened
|
|
|
|
- reopened
|
2022-01-20 18:31:06 +00:00
|
|
|
- synchronize
|
2023-12-14 18:55:51 +00:00
|
|
|
- edited
|
2022-01-20 18:31:06 +00:00
|
|
|
pull_request_review_comment:
|
|
|
|
types:
|
|
|
|
- created
|
2023-12-14 18:55:51 +00:00
|
|
|
env:
|
|
|
|
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}
|
2022-01-20 18:31:06 +00:00
|
|
|
jobs:
|
|
|
|
prcop:
|
|
|
|
runs-on: ubuntu-latest
|
2022-02-15 22:13:52 +00:00
|
|
|
name: Template Check
|
2022-01-20 18:31:06 +00:00
|
|
|
steps:
|
|
|
|
- name: Linting Pull Request
|
2022-01-20 20:56:33 +00:00
|
|
|
uses: makaroni4/prcop@v1.0.35
|
2022-01-20 18:31:06 +00:00
|
|
|
with:
|
|
|
|
config-file: '.github/workflows/prcop-config.json'
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-12-14 18:55:51 +00:00
|
|
|
check-type-label:
|
|
|
|
name: Check type Label
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- if: contains( env.LABELS, 'type:' ) == false
|
|
|
|
run: exit 1
|
|
|
|
check-milestone:
|
|
|
|
name: Check Milestone
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- if: github.event.pull_request.milestone == null && contains( env.LABELS, 'no milestone' ) == false
|
|
|
|
run: exit 1
|