Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adds PR check that verifies migration guide when flagged as breaking change #2141

Merged
merged 17 commits into from
Apr 15, 2024
Merged
20 changes: 20 additions & 0 deletions .github/workflows/check-migration-guide.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check migration guide

on:
pull_request:
types: [opened, reopened, synchronize, edited]

jobs:
check:
if: ${{ contains(github.event.pull_request.title, '!') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: changes
with:
filters: |
guides:
- 'website/docs/guides/**'
- if: ${{ steps.changes.outputs.guides == 'false' }}
run: echo "PR with breaking changes but no migration guide was created or updated" && exit 1
3 changes: 1 addition & 2 deletions contributing/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ Use [*Conventional Commits*](https://www.conventionalcommits.org/) to name pull
- `style: Description of the PR`: The commit updates or reformats the style of the source code, but does not otherwise change the product implementation (this correlates with Minor in Semantic Versioning).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was thinking if we should update our pull request template required check list with a point on the lines: If the changes include a breaking change, or a new feature that contributes to a coming major version (e.g. v1.15.0), a migration guide must be created or updated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, PR template changed

- `feat: Description of the PR`: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).
- `deprecate: Description of the PR`: The commit deprecates existing functionality, but does not remove it from the product (this correlates with MINOR in Semantic Versioning).
- `BREAKING CHANGE`: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
- `a ! in the description of the PR`: The commit introduces a breaking change (correlating with MAJOR in Semantic Versioning). A breaking change can be part of commits of any type.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples:
- `fix!: Description of the ticket`
- If the PR has `BREAKING CHANGE`: in its description is a breaking change
- `remove!: Description of the PR`: The commit removes a feature from the product. Typically features are deprecated first for a period of time before being removed. Removing a feature is a breaking change (correlating with MAJOR in Semantic Versioning).

Example PR title:
Expand Down