99 types : [ opened, synchronize, reopened, labeled, unlabeled ]
1010 branches :
1111 - master
12- paths :
13- - ' **/*.java'
1412
1513jobs :
1614 changelog-verification :
@@ -21,20 +19,27 @@ jobs:
2119 if : ${{ !contains(github.event.pull_request.labels.*.name, 'changelog-not-required') }}
2220 run : |
2321 git fetch origin ${{ github.base_ref }} --depth 1
24- NON_TEST_FILES=$( git diff remotes/origin/${{ github.base_ref }} --name-only | grep "\.java$" | grep -v -E "(^|/)(test|it)/" || true)
25- if [ -n "NON_TEST_FILES" ]; then
26- echo "::error ::Non-test Java change found:"
27- echo "NON_TEST_FILES" | while read file; do
28- echo "::error ::$file"
22+ NON_TEST_FILES=$(git diff remotes/origin/${{ github.base_ref }} --name-only | grep "\.java$" | grep -v -E "(^|/)(test|it)/" || true)
23+ if [ -n "$ NON_TEST_FILES" ]; then
24+ echo "::notice ::Non-test Java changes found:"
25+ echo "$ NON_TEST_FILES" | while read file; do
26+ echo "::notice ::$file"
2927 done
30- git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/next-release/*[a-zA-Z0-9_-]+\.json"
28+ echo "Checking for changelog entry..."
29+ CHANGELOG_FILES=$(git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/next-release/.*[a-zA-Z0-9_-]+\.json" || true)
30+ if [ -z "$CHANGELOG_FILES" ]; then
31+ echo "::error::No changelog entry found for Java changes"
32+ exit 1
33+ else
34+ echo "::notice::Changelog entry found: $CHANGELOG_FILES"
35+ fi
3136 else
32- echo "No change that may require a changelog entry found ."
37+ echo "::notice:: No non-test Java changes found. Changelog verification skipped ."
3338 fi
3439 - name : Error message
3540 if : ${{ failure() }}
3641 run : |
37- echo "::error ::No new/updated changelog entry found in /.changes/next-release directory. Please either:"
38- echo "::error ::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–"
39- echo "::error ::* Add the 'changelog-not-required' label to this PR (in rare cases not warranting a changelog entry)"
42+ echo "::error::No new/updated changelog entry found in /.changes/next-release directory. Please either:"
43+ echo "::error::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–"
44+ echo "::error::* Add the 'changelog-not-required' label to this PR (in rare cases not warranting a changelog entry)"
4045 exit 1
0 commit comments