mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
scripts+.github: add release notes updated check
This commit is contained in:
parent
8b04135863
commit
3f4b4f378e
2 changed files with 37 additions and 0 deletions
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
|
|
@ -243,3 +243,17 @@ jobs:
|
|||
|
||||
- name: run check
|
||||
run: make itest
|
||||
|
||||
########################
|
||||
# check PR updates release notes
|
||||
########################
|
||||
release-notes-check:
|
||||
name: check release notes updated
|
||||
runs-on: ubuntu-latest
|
||||
if: '!contains(github.event.pull_request.labels.*.name, ''no-changelog'')'
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: release notes check
|
||||
run: scripts/check-release-notes.sh
|
||||
23
scripts/check-release-notes.sh
Executable file
23
scripts/check-release-notes.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/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 }')
|
||||
|
||||
# If this is a PR being merged into the main repo, then the PR number will
|
||||
# actually be "master" here, so we'll ignore this case, and assume that in
|
||||
# order for it to be merged it had to pass the check in its base branch. If
|
||||
# we're trying to merge this with the Merge Queue, then the PR number will be
|
||||
# "gh-readonly-queue" instead.
|
||||
if [[ $PR_NUMBER == "master" ]] || [[ $PR_NUMBER == "gh-readonly-queue" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Ensure that the PR number at least shows up in the release notes folder under
|
||||
# one of the contained milestones.
|
||||
if ! grep -r -q "lightninglabs/lightning-terminal/pull/$PR_NUMBER" doc/release-notes; then
|
||||
echo "PR $PR_NUMBER didn't update release notes"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue