zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.11k stars 102 forks source link

Close issue on merge #871

Open prarit opened 1 year ago

prarit commented 1 year ago
cmd/mr_create.go: Add --close-issue option

Add an option that allows a user to specify issues that can be closed when
the merge request is merged.  The --close-issue option can be used
multiple times to indicate multiple issues.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>

close #844

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 56.52% and project coverage change: +0.31 :tada:

Comparison is base (cce34e2) 55.25% compared to head (971b5b7) 55.57%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #871 +/- ## ========================================== + Coverage 55.25% 55.57% +0.31% ========================================== Files 82 82 Lines 5961 5988 +27 ========================================== + Hits 3294 3328 +34 + Misses 2380 2371 -9 - Partials 287 289 +2 ``` | [Impacted Files](https://app.codecov.io/gh/zaquestion/lab/pull/871?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann) | Coverage Δ | | |---|---|---| | [cmd/mr\_show.go](https://app.codecov.io/gh/zaquestion/lab/pull/871?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL21yX3Nob3cuZ28=) | `65.80% <0.00%> (-1.52%)` | :arrow_down: | | [cmd/mr\_create.go](https://app.codecov.io/gh/zaquestion/lab/pull/871?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL21yX2NyZWF0ZS5nbw==) | `70.04% <59.09%> (-2.00%)` | :arrow_down: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/zaquestion/lab/pull/871/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

bmeneg commented 9 months ago

@prarit, the code rearrangement seems odd. Only func init() is left as the final function, the command creation has been the first bit after lib imports and global var declaration, doesn't it?

zampierilucas commented 9 months ago

@bmeneg I agree, on newly created function we use Run: func(... , so it might be nice to also add it here, since you moving it