From 5f9172dc61d3e50cef2441cbb3725cea1e17ff1c Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Tue, 23 Jan 2024 17:36:40 -0800 Subject: [PATCH 1/2] Add workflow for changelog Signed-off-by: Owais Kazi --- .github/workflows/changelog_verifier.yml | 19 +++++++++++++++++++ CHANGELOG.md | 19 +++++++++++++++++++ CONTRIBUTING.md | 19 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/changelog_verifier.yml create mode 100644 CHANGELOG.md diff --git a/.github/workflows/changelog_verifier.yml b/.github/workflows/changelog_verifier.yml new file mode 100644 index 000000000..26a4893c7 --- /dev/null +++ b/.github/workflows/changelog_verifier.yml @@ -0,0 +1,19 @@ +name: "Changelog Verifier" +on: + 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..9df54fa77 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +CHANGELOG +Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) + +## [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..bae00badc 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,24 @@ 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.0.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. From 982f020258cf49232946bea2b774cbd26b28c345 Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Tue, 23 Jan 2024 22:43:46 -0800 Subject: [PATCH 2/2] Addressed PR comments Signed-off-by: Owais Kazi --- .github/workflows/changelog_verifier.yml | 4 ++++ CHANGELOG.md | 5 ++++- CONTRIBUTING.md | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog_verifier.yml b/.github/workflows/changelog_verifier.yml index 26a4893c7..bc4a6ca39 100644 --- a/.github/workflows/changelog_verifier.yml +++ b/.github/workflows/changelog_verifier.yml @@ -1,5 +1,9 @@ name: "Changelog Verifier" on: + push: + branches-ignore: + - 'whitesource-remediate/**' + - 'backport/**' pull_request: types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled] diff --git a/CHANGELOG.md b/CHANGELOG.md index 9df54fa77..7bfc2c10b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ CHANGELOG -Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) + +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)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bae00badc..76ff9d0f2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,11 +81,10 @@ You may type this line on your own when writing your commit messages. However, i ## 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.0.0/) format. +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.