-
Notifications
You must be signed in to change notification settings - Fork 135
Fixes squash merge request for Single Job Mode #369
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
Open
anuragagarwal561994
wants to merge
13
commits into
smarkets:master
Choose a base branch
from
anuragagarwal561994:squash-fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fdf6afe
Adds squash options in project
anuragagarwal561994 7919a9e
Allows auto squash when the MR is squashable
anuragagarwal561994 14302c1
Adds default values breaking tests
anuragagarwal561994 c5903b8
Prevents breaking existing test cases
anuragagarwal561994 00785b2
Fixes linting
anuragagarwal561994 0e4e82c
Uses only project enforced
anuragagarwal561994 7552284
Fix tests by adding pip constraint for importlib-metadata.
theipster b3b10a3
reduce mocking, since squash check happens before approval check
theipster 4c98f7f
add test around `ensure_mergeable_mr()` function's handling of needin…
theipster 8fd54b3
remove non-API property `squash_enforced` to reduce footprint (and si…
theipster 75a2835
pytest parametrize over enum iterator of project squash options
theipster d528a86
add tests around `accept()` function's `squash` arg
theipster 3108ecf
Merge pull request #1 from theipster/master
anuragagarwal561994 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 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
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
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
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
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
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
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.
This is possibly something that the project owners will want to look at, but IMO it's fine in this repo
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.
Although this seems to be reverted in the next commit?
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.
Yes so there were 2 approaches in which this could have done. Earlier I was merging the project config with the MR config and then taking a decision.
But then I thought that there is only one case we need to address which is when at project level we have
sqaush_option: always
, so we are not taking any decision on behalf of the user or gitlab, instead we are respecting user's configuration and only sendingsquash: true
when the project level configuration is set to always because in that case even gitlab won't allow the user to change the configuration at MR level.For the earlier case I had to add a method to
merge_request
class which was exceeding the number of methods, but in this case we don't have to deal with this class at all, hence reverted.