[FEATURE] Skip merge commits in pull requests#79
Open
GriceTurrble wants to merge 7 commits intoGsActions:mainfrom
Open
[FEATURE] Skip merge commits in pull requests#79GriceTurrble wants to merge 7 commits intoGsActions:mainfrom
GriceTurrble wants to merge 7 commits intoGsActions:mainfrom
Conversation
GriceTurrble
commented
Aug 27, 2022
65e8b19 to
b7168b6
Compare
Merge commits can be identified by having two parent commits, so we add to the GraphQL query selecting PR commits to also return `parents.totalCount`. This shows any standard commit having 1 parent, and merge commits having 2. We can then `.filter()` out those instances before mapping commit messages.
4a5ac8b to
e60c7de
Compare
0ca7d29 to
a53485b
Compare
Member
|
Thanks for your PR @GriceTurrble . In the meantime I've extended the tests and also added the feature to the push event. |
aylen384
added a commit
to aylen384/os-autoinst
that referenced
this pull request
Nov 4, 2022
If branch names are too long, the tests would fail. This will only come into action when this is merged: GsActions/commit-message-checker#79
aylen384
added a commit
to aylen384/os-autoinst
that referenced
this pull request
Nov 4, 2022
If branch names are too long, the tests would fail. This will only come into action when this is merged: GsActions/commit-message-checker#79
|
Skipping merge commits is an interesting and useful feature. is this PR still valid? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge commits can be identified by having two parent commits, so we add to the GraphQL query selecting PR commits to also return
parents.totalCount. This shows any standard commit having 1 parent, and merge commits having 2.We can then
.filter()out those instances before mapping commit messages.Should fix #75
Note that TypeScript/JavaScript are not my strong suit. I would appreciate assistance in adding tests and perhaps bringing the same check to the
pushevent.