-
-
Notifications
You must be signed in to change notification settings - Fork 163
Draft: allow searching MRs by a state when it makes sense #623
Conversation
Marked as |
this allows us to filter which merge requests we want to search when searching by branch name, to also consider the state the previous default was to search only with the state "opened" this makes no sense for certain subcommands like 'reopen' whose entire purpose is purpose it to change the state of a merge request from "closed" to "reopened", as a consequence the 'reopen' subcommand would be absolutely useless when dealing with branch names instead of MR-IIDs this also applies to a lesser extent to other commands like 'note', there are valid reasons to comment on merge requests that have been "merged" or "closed", like thanking the contributor for the contribution
this quick-fixes the tests to conform to the changes done in the previous commit unfortunately it does not add more tests to see how well it handles the state
it makes sense that we should be able to view changes in "opened", "closed", "merged" and "locked" merge requests so use the keyword "any"
it makes sense to be able to update merge requests that are in any state
it makes sense to be able to sub and unsub from merge requests whatever state they are in
GitLab only allows approving and revoking approval when a merge request is "opened"
it is only possible to "reopen" merge requests that have been "closed"
we can only rebase "opened" merge requests
we should be able to comment on any merge request, except ones that are "locked" and we do not have high enugh permissions to comment despite it being "locked" unfortunately there is no implemented way in GitLab to query that so just search for any merge request
we can only merge "opened" merge requests
we can only close merge requests that are "opened"
we can checkout the changes in any merge request, in the future we might want to restrict "merged" ones when we have the capabilities
Rebased this on top of trunk, it should be good to open to review |
Codecov Report
@@ Coverage Diff @@
## trunk #623 +/- ##
==========================================
+ Coverage 60.51% 60.52% +0.01%
==========================================
Files 90 90
Lines 6357 6359 +2
==========================================
+ Hits 3847 3849 +2
Misses 2148 2148
Partials 362 362
Continue to review full report at Codecov.
|
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.
LGTM!
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.
LGTM
Description
This allows us to filter branch names by their state, allowing us to do certain things:
mr close
,mr merge
,mr rebase
and othersmr reopen
This change will increase the amount of prompt that
glab
does, if lots of people in your project submits merge requests via the namemaster
ormain
(or whatever people use these days) and you want to interact with a specific one you will be endlessly prompted.Related Issue
Resolves #620
How Has This Been Tested?
See screenshots
Screenshots (if appropriate):
Types of changes