From bc96606cafe6a500f45d466c6503624f0babb456 Mon Sep 17 00:00:00 2001 From: Freddy Date: Mon, 12 Dec 2022 13:36:42 -0700 Subject: [PATCH] Update changelog checker to handle ent-only entry (#15774) --- .github/workflows/changelog-checker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog-checker.yml b/.github/workflows/changelog-checker.yml index c4f467a3e0..bb13255d29 100644 --- a/.github/workflows/changelog-checker.yml +++ b/.github/workflows/changelog-checker.yml @@ -29,12 +29,12 @@ jobs: # for PRs against the main branch, the changelog file name should match the PR number if [ "${{ github.event.pull_request.base.ref }}" = "${{ github.event.repository.default_branch }}" ]; then enforce_matching_pull_request_number="matching this PR number " - changelog_file_path=".changelog/${{ github.event.pull_request.number }}.txt" + changelog_file_path=".changelog/(_)?${{ github.event.pull_request.number }}.txt" else - changelog_file_path=".changelog/*.txt" + changelog_file_path=".changelog/[_0-9]*.txt" fi - changelog_files=$(git --no-pager diff --name-only HEAD "$(git merge-base HEAD "origin/main")" -- ${changelog_file_path}) + changelog_files=$(git --no-pager diff --name-only HEAD "$(git merge-base HEAD "origin/main")" | egrep ${changelog_file_path}) # If we do not find a file in .changelog/, we fail the check if [ -z "$changelog_files" ]; then