Skip to content

Commit

Permalink
Merge pull request #5520 from Roasbeef/actions-require-release-notes
Browse files Browse the repository at this point in the history
build: add new GH actions to require release note updates
  • Loading branch information
Roasbeef authored Jul 16, 2021
2 parents 8acbe17 + 1219795 commit 7176a21
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,16 @@ jobs:

- name: ensure dependences at correct version
run: if ! grep -q "${{ matrix.pinned_dep }}" go.mod; then echo dependency ${{ matrix.pinned_dep }} should not be altered ; exit 1 ; fi

########################
# check PR updates release notes
########################
milestone-check:
name: check release notes updated
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v2

- name: release notes check
run: scripts/check-release-notes.sh
7 changes: 7 additions & 0 deletions docs/release-notes/release-notes-0.14.0.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Release Notes

# Build System

[A new pre-submit check has been
added](https://github.com/lightningnetwork/lnd/pull/5520) to ensure that all
PRs add an entry in the release notes folder that at leasts links to PR being
added.

# Contributors (Alphabetical Order)
14 changes: 14 additions & 0 deletions scripts/check-release-notes.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7176a21

Please sign in to comment.