Skip to content

Update api-surface-area-review-verification.yml to exclude non-java c… #6180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/api-surface-area-review-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
branches:
- master
paths:
- '**/*.java'

jobs:
api-surface-area-review-verification:
Expand All @@ -20,7 +22,7 @@ jobs:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-api-surface-area-change') }}
run: |
git fetch origin ${{ github.base_ref }} --depth 1
FILES=$( git diff remotes/origin/${{ github.base_ref }} --name-only | grep "\.java$" | grep -v -E "(^|/)(internal|test|codegen|v2-migration)/" || true)
FILES=$( git diff remotes/origin/${{ github.base_ref }} --name-only | grep "\.java$" | grep -v -E "(^|/)(internal|test|codegen|v2-migration|it)/" || true)
if [ -n "$FILES" ]; then
echo "::error::Changes around protected/public APIs found:"
echo "$FILES" | while read file; do
Expand All @@ -37,4 +39,4 @@ jobs:
echo "::error ::Change around public/protected APIs has been detected. Please either:"
echo "::error ::* Review it with the team and add the 'api-surface-area-reviewed' label to this PR after approval –or–"
echo "::error ::* Add the 'no-api-surface-area-change' label to this PR in case this is a false positive"
exit 1
exit 1
17 changes: 14 additions & 3 deletions .github/workflows/changelog-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
branches:
- master
paths:
- '**/*.java'

jobs:
changelog-verification:
Expand All @@ -18,12 +20,21 @@ jobs:
- name: Check for changelog entry
if: ${{ !contains(github.event.pull_request.labels.*.name, 'changelog-not-required') }}
run: |
git fetch origin ${{ github.base_ref }} --depth 1 && \
git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/next-release/*[a-zA-Z0-9_-]+\.json"
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"
done
git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/next-release/*[a-zA-Z0-9_-]+\.json"
else
echo "No change that may require a changelog entry found."
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)"
exit 1
exit 1