Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Docs Checklist
Please ensure you have addressed documentation updates if needed as part of this PR:
- [ ] I have created a separate PR on the sequence docs repository for documentation updates: [Link to docs PR](https://github.com/0xsequence/docs/pulls)
- [ ] No documentation update is needed for this change.
27 changes: 27 additions & 0 deletions .github/workflows/validate-pr-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Validate Docs PR Template

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
validate-template:
runs-on: ubuntu-latest

steps:
- name: Check PR Template Completion
run: |
# Fetch the pull request body
PR_BODY=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} \
| jq -r '.body')

# Check if one of the required checkboxes in the 'Docs Checklist' is marked
if ! echo "$PR_BODY" | grep -Eq '\[x\] I have created a separate PR on the sequence docs repository for documentation updates|\[x\] No documentation update is needed for this change'; then
echo "Error: The 'Docs Checklist' section in the PR template has not been completed properly."
echo "Please ensure you have checked one of the options in the 'Docs Checklist' section."
exit 1
fi

echo "Docs Checklist is complete."
Loading