-
Notifications
You must be signed in to change notification settings - Fork 178
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
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
684efb6
create action
lantoli e360617
check label
lantoli 2075033
check also title
lantoli ef8c3bf
check only title
lantoli 72da3c9
check migration folder
lantoli d0e82c7
test add file
lantoli eb44930
use path filter
lantoli 33f8f79
simplify if condition
lantoli 794bcc6
Revert "test add file"
lantoli d56a75c
change existing guide
lantoli 193ff9d
Revert "change existing guide"
lantoli 125b802
message
lantoli 60e26d1
Revert "Revert "change existing guide""
lantoli b51d658
Revert "Revert "Revert "change existing guide"""
lantoli 44ddd47
Merge branch 'master' into CLOUDP-241732_gha_migration_guide
lantoli ebb2477
doc
lantoli 51bfe9a
update PR template
lantoli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
- `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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this in line with the PR labeler config we use: https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/.github/pr-labeler.yml#L4 |
||
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: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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