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

Pass the correct value for merge_when_pipeline_succeeds #251

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

RobertKirk
Copy link
Contributor

Passing this value as True makes gitlab assume that the MR must have
a pipeline, which means if it's doesn't, then the MR will be denied.
Instead we should use the value of project.only_merge_if_pipeline_succeeds,
As this will mean the gitlab logic will be correct:
If the MR requires a pipeline to merge then we'll only merge if a pipeline
succeeds
If the MR doesn't needs a pipeline to succeed (i.e. has this setting on the
project off) then we won't pass the parameter and hence the merge will be allowed

Fixes issue #240

Passing this value as True makes gitlab assume that the MR must have
a pipeline, which means if it's doesn't, then the MR will be denied.
Instead we should use the value of project.only_merge_if_pipeline_succeeds,
As this will mean the gitlab logic will be correct:
   If the MR requires a pipeline to merge then we'll only merge if a pipeline
succeeds
   If the MR doesn't needs a pipeline to succeed (i.e. has this setting on the
project off) then we won't pass the parameter and hence the merge will be allowed

Fixes issue smarkets#240
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants