mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
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)
This commit is contained in:
parent
82e0a44587
commit
c293d62698
5
.github/pull_request_template.md
vendored
5
.github/pull_request_template.md
vendored
@ -1,4 +1,5 @@
|
||||
<!--
|
||||
PR Creation Checklist
|
||||
- [ ] Update Changelog
|
||||
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:
|
||||
- add `[skip changelog]` to the PR title
|
||||
- label the PR with `skip/changelog`
|
||||
-->
|
||||
|
||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -81,7 +81,7 @@ jobs:
|
||||
npm install ipfs-interop@^10.0.1
|
||||
working-directory: interop
|
||||
# Run the interop tests while ignoring the js-js interop test cases
|
||||
- run: npx ipfs-interop -- -t node --grep '^(?!.*(js\d? -> js\d?|js-js-js))' --parallel
|
||||
- run: npx ipfs-interop -- -t node --grep '^(?!.*(js\d? -> js\d?|js-js-js|js-rv\d?-js))' --parallel
|
||||
env:
|
||||
LIBP2P_TCP_REUSEPORT: false
|
||||
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
|
||||
|
||||
39
.github/workflows/changelog.yml
vendored
Normal file
39
.github/workflows/changelog.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
name: Changelog
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- synchronize
|
||||
- reopened
|
||||
- labeled
|
||||
- unlabeled
|
||||
paths:
|
||||
- '**.go'
|
||||
- '**/go.mod'
|
||||
- '**/go.sum'
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
if: contains(github.event.pull_request.title, '[skip changelog]') == false &&
|
||||
contains(github.event.pull_request.labels.*.name, 'skip/changelog') == false
|
||||
runs-on: ubuntu-latest
|
||||
name: Changelog
|
||||
steps:
|
||||
- id: changelog
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
ENDPOINT: repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files
|
||||
SELECTOR: 'map(select(.filename | startswith("docs/changelogs/"))) | length'
|
||||
run: gh api "$ENDPOINT" --jq "$SELECTOR" | xargs -I{} echo "modified={}" | tee -a $GITHUB_OUTPUT
|
||||
- if: steps.changelog.outputs.modified == '0'
|
||||
env:
|
||||
MESSAGE: |
|
||||
docs/changelogs/ was not modified in this PR. Please do one of the following:
|
||||
- add a changelog entry
|
||||
- add `[skip changelog]` to the PR title
|
||||
- label the PR with `skip/changelog`
|
||||
run: |
|
||||
echo "::error::${MESSAGE//$'\n'/%0A}"
|
||||
exit 1
|
||||
Loading…
Reference in New Issue
Block a user