Skip to content

Commit 0645781

Browse files
authored
Add changelog verifier workflow (#974)
Signed-off-by: Owais <owaiskazi19@gmail.com>
1 parent 93bdf2f commit 0645781

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
Viewed
3+
Original file line number Diff line number Diff line change
4+
@@ -0,0 +1,23 @@
5+
name: "Changelog Verifier"
6+
on:
7+
push:
8+
branches-ignore:
9+
- 'whitesource-remediate/**'
10+
- 'backport/**'
11+
pull_request:
12+
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]
13+
14+
jobs:
15+
# Enforces the update of a changelog file on every pull request
16+
verify-changelog:
17+
if: github.repository == 'opensearch-project/anomaly-detection'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
ref: ${{ github.event.pull_request.head.sha }}
24+
25+
- uses: dangoslen/changelog-enforcer@v3
26+
with:
27+
skipLabels: "autocut, skip-changelog"

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# CHANGELOG
2+
All notable changes to this project are documented in this file.
3+
4+
Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
5+
6+
## [Unreleased 3.0](https://github.com/opensearch-project/anomaly-detection/compare/2.x...HEAD)
7+
### Features
8+
### Enhancements
9+
### Bug Fixes
10+
### Infrastructure
11+
12+
### Documentation
13+
14+
### Maintenance
15+
### Refactoring
16+
17+
## [Unreleased 2.x](https://github.com/opensearch-project/anomaly-detection/compare/2.19...2.x)
18+
### Features
19+
20+
21+
### Enhancements
22+
- Github workflow for changelog verification ([#974](https://github.com/opensearch-project/anomaly-detection/pull/974))
23+
### Bug Fixes
24+
25+
### Infrastructure
26+
### Documentation
27+
### Maintenance
28+
### Refactoring

DEVELOPER_GUIDE.md

+18
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [Integration Tests](#integration-tests)
1010
- [Formatting](#formatting)
1111
- [Backports](#backports)
12+
- [Changelog](#changelog)
1213

1314
## Developer guide
1415

@@ -94,3 +95,20 @@ original PR with an appropriate label `backport <backport-branch-name>` is merge
9495
run successfully on the PR. For example, if a PR on main needs to be backported to `1.x` branch, add a label
9596
`backport 1.x` to the PR and make sure the backport workflow runs on the PR along with other checks. Once this PR is
9697
merged to main, the workflow will create a backport PR to the `1.x` branch.
98+
99+
## Changelog
100+
101+
AD dashboards maintains version specific changelog by enforcing a change to the ongoing [CHANGELOG](CHANGELOG.md) file adhering to the [Keep A Changelog](https://keepachangelog.com/en/1.1.0/) format.
102+
103+
Briefly, the changes are curated by version, with the changes to the main branch added chronologically to `Unreleased` version. Further, each version has corresponding sections which list out the category of the change - `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`.
104+
105+
#### How to add my changes to [CHANGELOG](CHANGELOG.md)?
106+
107+
As a contributor, you must ensure that every pull request has the changes listed out within the corresponding version and appropriate section of [CHANGELOG](CHANGELOG.md) file.
108+
109+
Adding in the change is two step process -
110+
1. Add your changes to the corresponding section within the CHANGELOG file with dummy pull request information, publish the PR
111+
112+
`Your change here ([#PR_NUMBER](PR_URL))`
113+
114+
2. Update the entry for your change in [`CHANGELOG.md`](CHANGELOG.md) and make sure that you reference the pull request there.

0 commit comments

Comments
 (0)