File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -188,3 +188,22 @@ jobs:
188
188
run : |
189
189
./scripts/check-stylish.sh
190
190
git diff --exit-code
191
+
192
+ check-changelogs :
193
+ name : Check changelogs
194
+ runs-on : ubuntu-latest
195
+ defaults :
196
+ run :
197
+ shell : bash
198
+
199
+ steps :
200
+ - name : Install dependencies
201
+ run : sudo apt install -y fd-find
202
+
203
+ - uses : actions/checkout@v3
204
+
205
+ - name : git fetch
206
+ run : git fetch origin main:main
207
+
208
+ - name : Check changelogs
209
+ run : ./scripts/check-changelogs.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ FD=" $( which fdfind 2> /dev/null || which fd 2> /dev/null) "
4
+
5
+ set -eo pipefail
6
+
7
+ function check_project () {
8
+ project=$1
9
+ n=$( )
10
+ if [[ -n $( git diff --name-only origin/main..HEAD -- $project ) ]]; then
11
+ if [[ -z $( git diff --name-only origin/main..HEAD -- $project /CHANGELOG.md) ]]; then
12
+ echo " $project was modified but its CHANGELOG was not updated"
13
+ exit 1
14
+ fi
15
+ fi
16
+ }
17
+
18
+ for cbl in $( $FD -e ' cabal' ) ; do
19
+ check_project $( dirname $cbl )
20
+ done
21
+
You can’t perform that action at this time.
0 commit comments