Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@


---

- [ ] [Issue](https://github.com/json-schema-org/json-schema-spec/issues) linked
- [ ] [Milestone](https://github.com/json-schema-org/json-schema-spec/milestones) assigned
- [ ] Test coverage issue in [test suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite)
34 changes: 34 additions & 0 deletions .github/workflows/checklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Checklist Handler
on:
pull_request:
workflow_dispatch:

jobs:
add-checklist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Comment Body
id: get-comment-body
run: |
existing="${{ github.event.pull_request.body }}"
body="${existing}$(cat .github/workflows/checklist.md)"
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
- name: Update comment
if: github.event.action == 'opened'
uses: AsasInnab/pr-body-action@v1
with:
body: ${{ steps.get-comment-body.outputs.body }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
enforce-checklist:
runs-on: ubuntu-latest
needs: add-checklist
steps:
- uses: mheap/require-checklist-action@v1
with:
requireChecklist: false # If this is true and there are no checklists detected, the action will fail
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}