Skip to content

Commit

Permalink
Enhance changelog workflow to check for missing labels
Browse files Browse the repository at this point in the history
Signed-off-by: Kunal Kotwani <[email protected]>
  • Loading branch information
kotwanikunal committed Apr 10, 2024
1 parent 74232c7 commit 4ba79ca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
# Enforces the update of a changelog file on every pull request
verify-changelog:
if: github.repository == 'opensearch-project/OpenSearch'
# if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -27,5 +27,12 @@ jobs:
continue-on-error: true
- run: |
if [[ ${{ steps.verify-changelog-3x.outcome }} == 'failure' && ${{ steps.verify-changelog.outcome }} == 'failure' ]]; then
echo "error: Please ensure a changelog entry exists in CHANGELOG.md or CHANGELOG-3.0.md"
exit 1
fi
labels=${{ github.event.pull_request.labels.*.name }}
if [[ ${{ steps.verify-changelog.outcome }} == 'success' && ! $labels =~ "backport" ]]; then
echo "error: Please make sure that the PR has a backport label associated with it when making an entry to the CHANGELOG.md file"
exit 1
fi

0 comments on commit 4ba79ca

Please sign in to comment.