diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..8809fda --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,51 @@ +name: Changelog Check + +on: + pull_request: + branches: + - main # adjust to your default branch + +jobs: + changelog: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write # Needed to post comments + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Needed for diff mode + + - name: Validate Changelog + id: changelog-check + uses: ./changelog-check + with: + check-mode: diff + base-ref: ${{ github.event.pull_request.base.ref }} + + - name: Find existing changelog comment + if: always() # Run regardless of breaking change status + uses: peter-evans/find-comment@v4 + id: find-comment + with: + issue-number: ${{ github.event.pull_request.number }} + body-includes: "" + + - name: Comment on breaking changes + if: always() # Run regardless of breaking change status + uses: peter-evans/create-or-update-comment@v5 + with: + issue-number: ${{ github.event.pull_request.number }} + comment-id: ${{ steps.find-comment.outputs.comment-id }} + edit-mode: replace + body: | + + ${{ steps.changelog-check.outputs.has_breaking == 'true' && + '**This PR contains breaking changes.** Please ensure this is intentional and properly documented.' || + 'No breaking changes detected.' }} + + - name: Fail if invalid + if: steps.changelog-check.outputs.is_valid != 'true' + run: | + echo "::error::CHANGELOG validation failed. Please fix the CHANGELOG.md format." + exit 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index c932d31..a436b20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,3 +16,16 @@ Breaking changes are prefixed with "Breaking Change: ". and detects breaking changes. - `autotag-from-changelog` action: tag and push from CHANGELOG.md version change. + +### Removed + +- Removed something to check workflow + +## [1.0.0] - 2026-03-06 + +### Added + +- CHANGELOG.md and backfilled tags and changes. +- Egress private endpoint management commands +- Cluster disruption simulation commands +- Physical replication stream management commands diff --git a/changelog-check/check_breaking_changes.sh b/changelog-check/check_breaking_changes.sh index 277e376..1ab5b95 100755 --- a/changelog-check/check_breaking_changes.sh +++ b/changelog-check/check_breaking_changes.sh @@ -17,7 +17,7 @@ unreleased_content="${UNRELEASED_CONTENT:-}" if [ "$check_mode" = "diff" ] && [ -n "$base_ref" ]; then log_notice "Diff mode: checking changelog changes only" # Get diff, filter to additions, remove file header, strip leading + - text_to_check=$(git diff "$base_ref" HEAD -- "$changelog" | grep "^+" | grep --invert-match "^+++" | sed 's/^+//') + text_to_check=$(git diff "origin/$base_ref" HEAD -- "$changelog" | grep "^+" | grep --invert-match "^+++" | sed 's/^+//') else log_notice "Checking entire Unreleased section" # Use the Unreleased section content from mindsers action