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
13 changes: 8 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ and any other relevant information.*

---

**Change Checklist**:
# Change Checklist

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)).
Observe the following checklist items before and after merging, as applicable.

Before merging:
1. [ ] Add a CHANGELOG entry ([example](https://github.com/NREL/GEOPHIRES-X/commit/15e10e5c3c08633a16645e41dfb7e8131805483f)). RST Template:
**Before merging:**
1. [ ] I certify that I am a human and I have manually verified the correctness of the changes in this PR.
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:
```restructuredtext
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>`__
```

After merging:
[^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).

**After merging:**
1. [ ] Push tag(s) to GitHub: `git push origin refs/tags/vM.m.P`
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:
```markdown
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/enforce-pr-checklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Enforce PR Checklist

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

jobs:
verify-pr-checklist:
runs-on: ubuntu-latest
steps:
- name: Verify checklist items in the PR description
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
# Use grep to look for the checked box (handles lowercase 'x' or uppercase 'X')
if echo "$PR_BODY" | grep -Eq '\[[xX]\] I certify that I am a human'; then
echo "Required PR description checklist items verified. Passing."
exit 0
else
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)"
exit 1
fi
Loading