Skip to content

Commit 2cf3f64

Browse files
Add Changelog verifier workflow (#1413) (#1416)
* Add Changelog verifier workflow * Add documentation --------- (cherry picked from commit f8307ab) Signed-off-by: Owais <owaiskazi19@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 6d64372 commit 2cf3f64

File tree

3 files changed

+75
-0
lines changed

3 files changed

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

DEVELOPER_GUIDE.md

+24
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [Backports](#backports)
1212
- [Gradle Plugins](#gradle-plugins)
1313
- [Distribution Download Plugin](#distribution-download-plugin)
14+
- [Changelog](#changelog)
1415

1516
## Developer Guide
1617

@@ -102,3 +103,26 @@ The Distribution Download plugin downloads the latest version of OpenSearch by d
102103
```
103104
./gradlew integTest -PcustomDistributionUrl="https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/1127/linux/x64/dist/opensearch-1.2.0-linux-x64.tar.gz"
104105
```
106+
107+
## Changelog
108+
109+
AD 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.
110+
111+
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`.
112+
113+
#### How to add my changes to [CHANGELOG](CHANGELOG.md)?
114+
115+
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.
116+
117+
Adding in the change is two step process -
118+
1. Add your changes to the corresponding section within the CHANGELOG file with dummy pull request information, publish the PR
119+
120+
`Your change here ([#PR_NUMBER](PR_URL))`
121+
122+
2. Update the entry for your change in [`CHANGELOG.md`](CHANGELOG.md) and make sure that you reference the pull request there.
123+
124+
[Example PR](https://github.com/opensearch-project/flow-framework/pull/998/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR24)
125+
126+
For future release notes, all entries can be directly copied to the release notes and then deleted from either the 2.x or 3.0 section as a cleanup. For example, see: https://github.com/opensearch-project/flow-framework/pull/1036/files
127+
128+
For changes that don't require an entry, we can add the 'skip-changelog' label to the PR. This will allow the changelog workflow to pass without adding an entry."

0 commit comments

Comments
 (0)