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 <[email protected]>
  • Loading branch information
kotwanikunal committed Apr 3, 2024
1 parent 1869680 commit 7b7b86f
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,49 @@
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'
verify-changelog-3x:
# 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
with:
skipLabels: "autocut, skip-changelog"
changeLogPath: 'CHANGELOG-3.0.md'
- if: always()
run: |
exit 0
verify-changelog-2x:
# if: github.repository == 'opensearch-project/OpenSearch' && needs.verify-changelog-3x.result == 'failure'
if: always()
runs-on: ubuntu-latest
needs: [ verify-changelog-3x ]
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: "autocut, skip-changelog"
changeLogPath: 'CHANGELOG-2.0.md'
- if: always()
run: |
exit 0
overall-status:
# if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest
needs: [ verify-changelog-3x, verify-changelog-2x ]
steps:
- name: Check job statuses
run: |
if [[ ${{ needs.verify-changelog-3x.result }} == 'failure' && ${{ needs.verify-changelog-2x.result }} == 'failure' ]]; then
exit 1
fi

0 comments on commit 7b7b86f

Please sign in to comment.