File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -143,3 +143,32 @@ jobs:
143
143
echo "CURRENT =${CURRENT}"
144
144
echo "EXPECTED=${EXPECTED}"
145
145
test "${CURRENT}" = "${EXPECTED}"
146
+
147
+ changelog :
148
+
149
+ name : Changelog
150
+ runs-on : ubuntu-latest
151
+ timeout-minutes : 5
152
+
153
+ if : >-
154
+ github.event_name == 'pull_request' &&
155
+ !contains(github.event.head_commit.message, 'nochangelog') &&
156
+ !contains(github.event.head_commit.message, 'no-changelog') &&
157
+ !contains(github.event.head_commit.message, 'no changelog') &&
158
+ !contains(github.event.pull_request.labels.*.name, 'no-changelog')
159
+
160
+ steps :
161
+ - name : Checkout
162
+ uses : actions/checkout@v4
163
+ with :
164
+ fetch-depth : 0
165
+
166
+ - name : Check for CHANGELOG entry
167
+ env :
168
+ TARGET : ${{ github.event.pull_request.base.ref }}
169
+ run : |
170
+ FILES_CHANGED=$(git diff --name-only origin/$TARGET...HEAD | grep -E 'CHANGELOG\.md' -c)
171
+ if [ "$FILES_CHANGED" != "1" ]; then
172
+ echo "CHANGELOG.md was not updated";
173
+ exit 1;
174
+ fi;
You can’t perform that action at this time.
0 commit comments