ci: add changelog update checker workflow [skip changelog] (#10002)
* ci: add changelog update checker workflow * ci: trigger changelog workflow when modifying Go files only * ci: disable js-rv-js tests in interop (#10007)
Piotr Galar committed
Jul 6, 2023 at 08:13 UTC
c293d6269861614e0efd4c4e9d996d193150fbf5
3 files changed
+43
-3
.github/pull_request_template.md
+3
-2
@@ -1,4 +1,5 @@
1
<!--
2
-PR Creation Checklist
3
-- [ ] Update Changelog
2
+Please update docs/changelogs/ if you're modifying Go files. If your change does not require a changelog entry, please do one of the following:
3
+- add `[skip changelog]` to the PR title
4
+- label the PR with `skip/changelog`
5
-->
.github/workflows/build.yml
+1
-1
@@ -81,7 +81,7 @@ jobs:
81
npm install ipfs-interop@^10.0.1
82
working-directory: interop
83
# Run the interop tests while ignoring the js-js interop test cases
84
- - run: npx ipfs-interop -- -t node --grep '^(?!.*(js\d? -> js\d?|js-js-js))' --parallel
84
+ - run: npx ipfs-interop -- -t node --grep '^(?!.*(js\d? -> js\d?|js-js-js|js-rv\d?-js))' --parallel
85
env:
86
LIBP2P_TCP_REUSEPORT: false
87
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
.github/workflows/changelog.yml
new
+39
@@ -0,0 +1,39 @@
1
+name: Changelog
2
+
3
+on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - edited
8
+ - synchronize
9
+ - reopened
10
+ - labeled
11
+ - unlabeled
12
+ paths:
13
+ - '**.go'
14
+ - '**/go.mod'
15
+ - '**/go.sum'
16
+
17
+jobs:
18
+ changelog:
19
+ if: contains(github.event.pull_request.title, '[skip changelog]') == false &&
20
+ contains(github.event.pull_request.labels.*.name, 'skip/changelog') == false
21
+ runs-on: ubuntu-latest
22
+ name: Changelog
23
+ steps:
24
+ - id: changelog
25
+ env:
26
+ GITHUB_TOKEN: ${{ github.token }}
27
+ ENDPOINT: repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files
28
+ SELECTOR: 'map(select(.filename | startswith("docs/changelogs/"))) | length'
29
+ run: gh api "$ENDPOINT" --jq "$SELECTOR" | xargs -I{} echo "modified={}" | tee -a $GITHUB_OUTPUT
30
+ - if: steps.changelog.outputs.modified == '0'
31
+ env:
32
+ MESSAGE: |
33
+ docs/changelogs/ was not modified in this PR. Please do one of the following:
34
+ - add a changelog entry
35
+ - add `[skip changelog]` to the PR title
36
+ - label the PR with `skip/changelog`
37
+ run: |
38
+ echo "::error::${MESSAGE//$'\n'/%0A}"
39
+ exit 1