Skip to content

Commit

Permalink
Enhance changelog verifier script
Browse files Browse the repository at this point in the history
Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
  • Loading branch information
kotwanikunal committed Apr 4, 2024
1 parent 1869680 commit b4413e0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
name: "Changelog Verifier"
on:
pull_request:
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

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
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}

- uses: dangoslen/changelog-enforcer@v3
id: verify-changelog-3x
with:
skipLabels: "autocut, skip-changelog"
changeLogPath: 'CHANGELOG-3.0.md'
continue-on-error: true
- uses: dangoslen/changelog-enforcer@v3
id: verify-changelog-2x
with:
skipLabels: "autocut, skip-changelog"
changeLogPath: 'CHANGELOG-2.0.md'
continue-on-error: true
- run: |
if [[ ${{ steps.verify-changelog-3x.outcome }} == 'failure' && ${{ steps.verify-changelog-2x.outcome }} == 'failure']]; then
exit 1
fi

0 comments on commit b4413e0

Please sign in to comment.