File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
.github/actions/changelog-verification Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ' Changelog Verification'
2+ description : ' Verifies that a PR includes a valid changelog entry'
3+
4+ runs :
5+ using : " composite"
6+ steps :
7+ - name : Checkout sources
8+ uses : actions/checkout@v4
9+
10+ - name : Setup kat
11+ uses : awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main
12+
13+ - name : Check for new changelog entry
14+ if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') }}
15+ shell : bash
16+ run : |
17+ git fetch origin ${{ github.base_ref }} --depth 1
18+ if ! git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/[0-9a-f-]+\.json"; then
19+ echo "::error ::No new/updated changelog entry found in /.changes directory. Please either:"
20+ echo "::error ::* Add a changelog entry (see CONTRIBUTING.md for instructions) or"
21+ echo "::error ::* Add the 'no-changelog' label to this PR (in rare cases not warranting a changelog entry)"
22+ exit 1
23+ fi
24+
25+ - name : Verify all changelogs
26+ shell : bash
27+ run : |
28+ if ! kat changelog ls; then
29+ echo "::error ::Changelog verification failed. Please check the format of your changelog entry."
30+ exit 1
31+ fi
You can’t perform that action at this time.
0 commit comments