mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 10:35:32 +02:00
build: add new GH actions to require release note updates
In this commit, we add a simple bash script to parse out the current PR number from an environment variable in the GH actions context, and use that to check to see if the PR has been referenced in the release notes or not. This isn't 100% fool proof, but it should catch most of the common cases.
This commit is contained in:
14
scripts/check-release-notes.sh
Executable file
14
scripts/check-release-notes.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Extract the PR number which is stored in the $GITHUB_REF env variable. The
|
||||
# format of the string stored in the variable is: refs/pull/:PRNUMBER/merge.
|
||||
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
|
||||
|
||||
# Ensure that the PR number at least shows up in the release notes folder under
|
||||
# one of the contained milestones.
|
||||
if ! grep -r -q "lightningnetwork/lnd/pull/$PR_NUMBER" docs/release-notes; then
|
||||
echo "PR $PR_NUMBER didn't update release notes"
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user