File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -243,3 +243,17 @@ jobs:
243
243
244
244
- name : run check
245
245
run : make itest
246
+
247
+ # #######################
248
+ # check PR updates release notes
249
+ # #######################
250
+ release-notes-check :
251
+ name : check release notes updated
252
+ runs-on : ubuntu-latest
253
+ if : ' !contains(github.event.pull_request.labels.*.name, '' no-changelog'' )'
254
+ steps :
255
+ - name : git checkout
256
+ uses : actions/checkout@v3
257
+
258
+ - name : release notes check
259
+ run : scripts/check-release-notes.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ # Extract the PR number which is stored in the $GITHUB_REF env variable. The
6
+ # format of the string stored in the variable is: refs/pull/:PRNUMBER/merge.
7
+ PR_NUMBER=$( echo $GITHUB_REF | awk ' BEGIN { FS = "/" } ; { print $3 }' )
8
+
9
+ # If this is a PR being merged into the main repo, then the PR number will
10
+ # actually be "master" here, so we'll ignore this case, and assume that in
11
+ # order for it to be merged it had to pass the check in its base branch. If
12
+ # we're trying to merge this with the Merge Queue, then the PR number will be
13
+ # "gh-readonly-queue" instead.
14
+ if [[ $PR_NUMBER == " master" ]] || [[ $PR_NUMBER == " gh-readonly-queue" ]]; then
15
+ exit 0
16
+ fi
17
+
18
+ # Ensure that the PR number at least shows up in the release notes folder under
19
+ # one of the contained milestones.
20
+ if ! grep -r -q " lightninglabs/lightning-terminal/pull/$PR_NUMBER " doc/release-notes; then
21
+ echo " PR $PR_NUMBER didn't update release notes"
22
+ exit 1
23
+ fi
You can’t perform that action at this time.
0 commit comments