From b269163f2f51381e6274aa6c211da9271e5a8dd0 Mon Sep 17 00:00:00 2001 From: Zoe Wang <33073555+zoewangg@users.noreply.github.com> Date: Wed, 25 Jun 2025 11:25:38 -0700 Subject: [PATCH 1/2] Remove paths filter from serveral GH action items --- .github/workflows/api-surface-area-review-verification.yml | 2 -- .github/workflows/changelog-verification.yml | 2 -- .github/workflows/new-module-verification.yml | 3 --- 3 files changed, 7 deletions(-) diff --git a/.github/workflows/api-surface-area-review-verification.yml b/.github/workflows/api-surface-area-review-verification.yml index f65e30c758de..eef6b517dab8 100644 --- a/.github/workflows/api-surface-area-review-verification.yml +++ b/.github/workflows/api-surface-area-review-verification.yml @@ -9,8 +9,6 @@ on: types: [ opened, synchronize, reopened, labeled, unlabeled ] branches: - master - paths: - - '**/*.java' jobs: api-surface-area-review-verification: diff --git a/.github/workflows/changelog-verification.yml b/.github/workflows/changelog-verification.yml index 111ebf18a4c0..10fdc5bfcef3 100644 --- a/.github/workflows/changelog-verification.yml +++ b/.github/workflows/changelog-verification.yml @@ -9,8 +9,6 @@ on: types: [ opened, synchronize, reopened, labeled, unlabeled ] branches: - master - paths: - - '**/*.java' jobs: changelog-verification: diff --git a/.github/workflows/new-module-verification.yml b/.github/workflows/new-module-verification.yml index 0d174df826ed..f04b620d200d 100644 --- a/.github/workflows/new-module-verification.yml +++ b/.github/workflows/new-module-verification.yml @@ -6,9 +6,6 @@ on: branches: - master - feature/master/* - paths: - - '**/*.xml' - - '.brazil.json' permissions: contents: read From d6ebe445468333b8778d0df8615d148468ece548 Mon Sep 17 00:00:00 2001 From: Zoe Wang <33073555+zoewangg@users.noreply.github.com> Date: Wed, 25 Jun 2025 12:32:50 -0700 Subject: [PATCH 2/2] Improve changelog-verification yml --- .github/workflows/changelog-verification.yml | 27 ++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/changelog-verification.yml b/.github/workflows/changelog-verification.yml index 10fdc5bfcef3..bc619e590851 100644 --- a/.github/workflows/changelog-verification.yml +++ b/.github/workflows/changelog-verification.yml @@ -19,20 +19,27 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'changelog-not-required') }} run: | git fetch origin ${{ github.base_ref }} --depth 1 - NON_TEST_FILES=$( git diff remotes/origin/${{ github.base_ref }} --name-only | grep "\.java$" | grep -v -E "(^|/)(test|it)/" || true) - if [ -n "NON_TEST_FILES" ]; then - echo "::error::Non-test Java change found:" - echo "NON_TEST_FILES" | while read file; do - echo "::error::$file" + NON_TEST_FILES=$(git diff remotes/origin/${{ github.base_ref }} --name-only | grep "\.java$" | grep -v -E "(^|/)(test|it)/" || true) + if [ -n "$NON_TEST_FILES" ]; then + echo "::notice::Non-test Java changes found:" + echo "$NON_TEST_FILES" | while read file; do + echo "::notice::$file" done - git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/next-release/*[a-zA-Z0-9_-]+\.json" + echo "Checking for changelog entry..." + CHANGELOG_FILES=$(git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/next-release/.*[a-zA-Z0-9_-]+\.json" || true) + if [ -z "$CHANGELOG_FILES" ]; then + echo "::error::No changelog entry found for Java changes" + exit 1 + else + echo "::notice::Changelog entry found: $CHANGELOG_FILES" + fi else - echo "No change that may require a changelog entry found." + echo "::notice::No non-test Java changes found. Changelog verification skipped." fi - name: Error message if: ${{ failure() }} run: | - echo "::error ::No new/updated changelog entry found in /.changes/next-release directory. Please either:" - echo "::error ::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–" - echo "::error ::* Add the 'changelog-not-required' label to this PR (in rare cases not warranting a changelog entry)" + echo "::error::No new/updated changelog entry found in /.changes/next-release directory. Please either:" + echo "::error::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–" + echo "::error::* Add the 'changelog-not-required' label to this PR (in rare cases not warranting a changelog entry)" exit 1