Skip to content

Commit c293d62

Browse files
authored
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)
1 parent 82e0a44 commit c293d62

File tree

3 files changed

+43
-3
lines changed

3 files changed

+43
-3
lines changed

.github/pull_request_template.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!--
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`
45
-->

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
npm install ipfs-interop@^10.0.1
8282
working-directory: interop
8383
# 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
8585
env:
8686
LIBP2P_TCP_REUSEPORT: false
8787
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1

.github/workflows/changelog.yml

+39
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)