mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
github: require release notes for pull requests
This commit is contained in:
parent
a8e3e9c853
commit
414760c607
3 changed files with 41 additions and 2 deletions
4
.github/pull_request_template.md
vendored
4
.github/pull_request_template.md
vendored
|
|
@ -1,3 +1,3 @@
|
|||
#### Pull Request Checklist
|
||||
- [ ] Update `docs/release-notes/release-notes-next.md` if your PR contains
|
||||
major features, breaking changes or bugfixes
|
||||
- [ ] Add an entry to `docs/release-notes/release-notes-next.md` (required by
|
||||
CI)
|
||||
|
|
|
|||
36
.github/workflows/main.yml
vendored
36
.github/workflows/main.yml
vendored
|
|
@ -24,6 +24,42 @@ env:
|
|||
LITD_ITEST_BRANCH: master
|
||||
|
||||
jobs:
|
||||
########################
|
||||
# release notes
|
||||
########################
|
||||
release-notes:
|
||||
name: Release Notes
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check for a release note
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
RELEASE_NOTES_FILE: docs/release-notes/release-notes-next.md
|
||||
run: |
|
||||
if git diff --unified=0 "$BASE_SHA...$HEAD_SHA" -- \
|
||||
"$RELEASE_NOTES_FILE" |
|
||||
awk '
|
||||
/^@@/ { in_hunk = 1; next }
|
||||
in_hunk && /^\+/ {
|
||||
line = substr($0, 2)
|
||||
if (line ~ /[^[:space:]]/) found = 1
|
||||
}
|
||||
END { exit found ? 0 : 1 }
|
||||
'
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "::error file=$RELEASE_NOTES_FILE::Add a release note for this PR."
|
||||
exit 1
|
||||
|
||||
########################
|
||||
# commit message lint
|
||||
########################
|
||||
|
|
|
|||
|
|
@ -13,4 +13,7 @@
|
|||
|
||||
#### Maintenance
|
||||
|
||||
* Added a CI gate requiring every pull request to include a non-empty entry in
|
||||
the next release notes.
|
||||
|
||||
#### Contributors (Alphabetical Order)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue