Skip to content

Commit 5b0d901

Browse files
author
Jay Deng
committed
Improve breaking change logic for changelog verifier
1 parent a02230d commit 5b0d901

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/changelog_verifier.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,26 @@ jobs:
3030
if [[ ${{ steps.verify-changelog-3x.outcome }} == 'success' && ${{ steps.verify-changelog.outcome }} == 'success' ]]; then
3131
exit 0
3232
fi
33-
33+
3434
if [[ ${{ steps.verify-changelog-3x.outcome }} == 'failure' && ${{ steps.verify-changelog.outcome }} == 'failure' ]]; then
3535
echo "error: Please ensure a changelog entry exists in CHANGELOG.md or CHANGELOG-3.0.md"
3636
exit 1
3737
fi
38-
38+
3939
# Concatenates the labels and checks if the string contains "backport"
4040
has_backport_label=${{ contains(join(github.event.pull_request.labels.*.name, ', '), 'backport')}}
4141
if [[ ${{ steps.verify-changelog.outcome }} == 'success' && $has_backport_label == false ]]; then
4242
echo "error: Please make sure that the PR has a backport label associated with it when making an entry to the CHANGELOG.md file"
4343
exit 1
4444
fi
45+
46+
if [[ ${{ steps.verify-changelog-3x.outcome }} == 'success' && $has_backport_label == false ]]; then
47+
echo "error: Please make sure that the PR does not have a backport label associated with it when making an entry to the CHANGELOG-3.0.md file"
48+
exit 1
49+
fi
50+
51+
has_breaking_label=${{ contains(join(github.event.pull_request.labels.*.name, ', '), '>breaking')}}
52+
if [[ $has_breaking_label == true && $has_backport_label == true ]]; then
53+
echo "error: Please make sure that the PR does not have a backport label associated with it when making breaking changes"
54+
exit 1
55+
fi

CHANGELOG-3.0.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1313
- GHA to verify checklist items completion in PR descriptions ([#10800](https://github.com/opensearch-project/OpenSearch/pull/10800))
1414
- Allow to pass the list settings through environment variables (like [], ["a", "b", "c"], ...) ([#10625](https://github.com/opensearch-project/OpenSearch/pull/10625))
1515
- Views, simplify data access and manipulation by providing a virtual layer over one or more indices ([#11957](https://github.com/opensearch-project/OpenSearch/pull/11957))
16+
- Test Item ([#11957](https://github.com/opensearch-project/OpenSearch/pull/11957))
1617

1718
### Dependencies
1819

0 commit comments

Comments
 (0)