Skip to content

Commit

Permalink
add pr tasks check
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Dec 10, 2024
1 parent 6e65dd1 commit 07f2aa5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [ ] Breaking changes enumerated in [the release issue](https://github.com/demergent-labs/azle/issues/2053)
- [ ] New documentation enumerated in [the release issue](https://github.com/demergent-labs/azle/issues/2053)
- [ ] Code has been declaratized
- [ ] Error handling beautiful (no unwraps or expects etc)
- [ ] Code tested thoroughly
36 changes: 36 additions & 0 deletions .github/workflows/pr_tasks_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PR Tasks Check

on:
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
- edited

jobs:
docs_review_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: All tasks completed
run: |
# Get PR data including body and labels
PR_DATA=$(gh pr view ${{ github.event.pull_request.number }} --json body)
# Extract PR body
PR_BODY=$(echo "$PR_DATA" | jq -r .body)
# Check for unchecked tasks (- [ ])
if echo "$PR_BODY" | grep -q "\- \[ \]"; then
echo "Error: Found unchecked tasks in the PR description. Please complete all tasks before merging."
echo "Unchecked tasks:"
echo "$PR_BODY" | grep "\- \[ \]"
exit 1
fi
echo "All tasks completed"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 07f2aa5

Please sign in to comment.