Skip to content

Commit 08443af

Browse files
Merge pull request #160 from softwareengineerprogrammer/pr-template_2026-05-30
PR checklist enforcement
2 parents b8019b8 + 96cea9a commit 08443af

2 files changed

Lines changed: 30 additions & 5 deletions

File tree

.github/pull_request_template.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@ and any other relevant information.*
1111

1212
---
1313

14-
**Change Checklist**:
14+
# Change Checklist
1515

16-
Observe the following checklist items if your change includes a new version (see [versioning notes](https://github.com/NREL/GEOPHIRES-X/blob/main/CHANGELOG.rst#versioning-notes) and [version management docs](https://github.com/NREL/GEOPHIRES-X/blob/main/CONTRIBUTING.rst#version-management)).
16+
Observe the following checklist items before and after merging, as applicable.
1717

18-
Before merging:
19-
1. [ ] Add a CHANGELOG entry ([example](https://github.com/NREL/GEOPHIRES-X/commit/15e10e5c3c08633a16645e41dfb7e8131805483f)). RST Template:
18+
**Before merging:**
19+
1. [ ] I certify that I am a human and I have manually verified the correctness of the changes in this PR.
20+
1. [ ] Add a CHANGELOG entry if your change includes a new version[^new-version-footnote] ([example](https://github.com/NREL/GEOPHIRES-X/commit/15e10e5c3c08633a16645e41dfb7e8131805483f)). RST Template:
2021
```restructuredtext
2122
M.m.P: `TITLE <https://github.com/NREL/GEOPHIRES-X/pull/PR-NUMBER>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/vM.m.P>`__
2223
```
2324

24-
After merging:
25+
[^new-version-footnote]: See [versioning notes](https://github.com/NREL/GEOPHIRES-X/blob/main/CHANGELOG.rst#versioning-notes) and [version management docs](https://github.com/NREL/GEOPHIRES-X/blob/main/CONTRIBUTING.rst#version-management).
26+
27+
**After merging:**
2528
1. [ ] Push tag(s) to GitHub: `git push origin refs/tags/vM.m.P`
2629
1. [ ] Post a change announcement to the [GEOPHIRES Change Announcements Discussion](https://github.com/NREL/GEOPHIRES-X/discussions/428) ([example](https://github.com/NREL/GEOPHIRES-X/discussions/428#discussioncomment-14593405)). Markdown template:
2730
```markdown
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Enforce PR Checklist
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize]
6+
7+
jobs:
8+
verify-pr-checklist:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Verify checklist items in the PR description
12+
env:
13+
PR_BODY: ${{ github.event.pull_request.body }}
14+
run: |
15+
# Use grep to look for the checked box (handles lowercase 'x' or uppercase 'X')
16+
if echo "$PR_BODY" | grep -Eq '\[[xX]\] I certify that I am a human'; then
17+
echo "Required PR description checklist items verified. Passing."
18+
exit 0
19+
else
20+
echo "::error::Merge blocked. Please review the applicable checklist items in your PR description. (If you have removed the checklist items from your description, please re-add them from the template: https://github.com/NREL/GEOPHIRES-X/blob/main/.github/pull_request_template.md#change-checklist)"
21+
exit 1
22+
fi

0 commit comments

Comments
 (0)