Skip to content

Commit 38f3717

Browse files
committed
Enhance changelog verifier script
Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
1 parent 1869680 commit 38f3717

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed
Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,47 @@
11
name: "Changelog Verifier"
22
on:
33
pull_request:
4-
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]
4+
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
55

66
jobs:
77
# Enforces the update of a changelog file on every pull request
8-
verify-changelog:
9-
if: github.repository == 'opensearch-project/OpenSearch'
8+
verify-changelog-3x:
9+
# if: github.repository == 'opensearch-project/OpenSearch'
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
1515
ref: ${{ github.event.pull_request.head.sha }}
16-
1716
- uses: dangoslen/changelog-enforcer@v3
1817
with:
1918
skipLabels: "autocut, skip-changelog"
19+
changeLogPath: 'CHANGELOG-3.0.md'
20+
- run: |
21+
exit 0
22+
verify-changelog-2x:
23+
# if: github.repository == 'opensearch-project/OpenSearch' && needs.verify-changelog-3x.result == 'failure'
24+
if: always()
25+
runs-on: ubuntu-latest
26+
needs: [ verify-changelog-3x ]
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
ref: ${{ github.event.pull_request.head.sha }}
32+
- uses: dangoslen/changelog-enforcer@v3
33+
with:
34+
skipLabels: "autocut, skip-changelog"
35+
changeLogPath: 'CHANGELOG-2.0.md'
36+
- run: |
37+
exit 0
38+
overall-status:
39+
# if: github.repository == 'opensearch-project/OpenSearch'
40+
runs-on: ubuntu-latest
41+
needs: [ verify-changelog-3x, verify-changelog-2x ]
42+
steps:
43+
- name: Check job statuses
44+
run: |
45+
if [[ ${{ needs.verify-changelog-3x.result }} == 'failure' && ${{ needs.verify-changelog-2x.result }} == 'failure' ]]; then
46+
exit 1
47+
fi

0 commit comments

Comments
 (0)