diff --git a/.github/workflows/changelog_verifier.yml b/.github/workflows/changelog_verifier.yml new file mode 100644 index 000000000..bc4a6ca39 --- /dev/null +++ b/.github/workflows/changelog_verifier.yml @@ -0,0 +1,23 @@ +name: "Changelog Verifier" +on: + push: + branches-ignore: + - 'whitesource-remediate/**' + - 'backport/**' + pull_request: + types: [opened, edited, review_requested, 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/flow-framework' + 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" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..7bfc2c10b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,22 @@ +CHANGELOG + + +Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) + +2.12.0 Initial Release +## [Unreleased] +### Added +- Github workflow for changelog verification ([#440](https://github.com/opensearch-project/flow-framework/pull/440)) + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Security + + +[Unreleased]: https://github.com/opensearch-project/flow-framework/compare/2.x...HEAD diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4d2fa07db..76ff9d0f2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,7 @@ - [Feature Requests](#feature-requests) - [Contributing Code](#contributing-code) - [Developer Certificate of Origin](#developer-certificate-of-origin) + - [Changelog](#changelog) - [Code Coverage](#code-coverage) - [Review Process](#review-process) @@ -78,6 +79,23 @@ Signed-off-by: Jane Smith ``` You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `--signoff` to add the `Signed-off-by` line to the end of the commit message. +## Changelog + +Flow Framework 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. + +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`. + +### How to add my changes to [CHANGELOG](CHANGELOG.md)? + +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. + +Adding in the change is two step process - +1. Add your changes to the corresponding section within the CHANGELOG file with dummy pull request information, publish the PR + +`Your change here ([#PR_NUMBER](PR_URL))` + +2. Update the entry for your change in [`CHANGELOG.md`](CHANGELOG.md) and make sure that you reference the pull request there. + ## Code Coverage Any new functionality requires testing. Your PR will trigger an automatic assessment of the code coverage of the lines you've added. You should add unit and/or integration tests to exercise as much of your new code as possible.