Skip to content

Commit

Permalink
Merge pull request #2296 from demergent-labs/workflow_checks
Browse files Browse the repository at this point in the history
Workflow checks
  • Loading branch information
lastmjs authored Dec 10, 2024
2 parents 6e65dd1 + f0d2138 commit be6abce
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 Checkboxes

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

jobs:
pr_tasks_check:
name: All PR checkboxes marked completed
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: The following checkboxes are not marked as completed:"
echo "$PR_BODY" | grep "\- \[ \]"
exit 1
fi
echo "All tasks completed"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit be6abce

Please sign in to comment.