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

mr_merge: add option for merging immediately #654

Merged

Conversation

bmeneg
Copy link
Collaborator

@bmeneg bmeneg commented Mar 26, 2021

Today, the lab mr merge command set, by default, the option of merging
only when pipeline succeeds, however, in some workflows (e.g. mine) it's not
entirely true: it's sometimes desirable a merge happens regardless the
pipeline results, for many different reasons.

This patch adds the lab mr merge --pipeline-succeeds (or -p) for
enabling it, while the default now is to merge directly.

Signed-off-by: Bruno Meneguele bmeneg@redhat.com

Fixes #653

@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Merging #654 (93871f7) into master (0f4aeea) will increase coverage by 0.00%.
The diff coverage is 20.00%.

❗ Current head 93871f7 differs from pull request most recent head bc51d1b. Consider uploading reports for the commit bc51d1b to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master     #654   +/-   ##
=======================================
  Coverage   55.70%   55.71%           
=======================================
  Files          76       76           
  Lines        4743     4744    +1     
=======================================
+ Hits         2642     2643    +1     
  Misses       1843     1843           
  Partials      258      258           
Impacted Files Coverage Δ
internal/gitlab/gitlab.go 7.00% <0.00%> (+0.01%) ⬆️
cmd/mr_merge.go 40.00% <25.00%> (-1.67%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7be9f9...bc51d1b. Read the comment docs.

Today, the `lab mr merge` command set, by default, the option of merging
only when pipeline succeeds, however, in some workflows (e.g. mine) it's not
desirable: it's sometimes desirable a merge happens regardless the
pipeline results, for many different reasons.

This patch adds the `lab mr merge --immediate` (or `-i`) for immediately
merge the MR.

Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
@bmeneg bmeneg force-pushed the feature-mr_merge-pipeline-succeeds branch from 93871f7 to bc51d1b Compare March 29, 2021 14:55
@bmeneg bmeneg changed the title mr_merge: add option for merging only when pipeline succeeds mr_merge: add option for merging immediately Mar 29, 2021
@bmeneg
Copy link
Collaborator Author

bmeneg commented Apr 6, 2021

I´ve tested this change locally and using a container to run the full test suite.

@bmeneg bmeneg merged commit f4aed0c into zaquestion:master Apr 6, 2021
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.

Add merge-request option for "Merge when pipeline succeeds"
1 participant