feat mr: remove prefix in ID of MR just like Issue
Created by: atusy
This change
- improves consistency of APIs.
- is copied from: https://github.com/profclems/glab/blob/0232a0c0791374ef5c1fa2072582a7127126b078/commands/issue/issueutils/utils.go#L106
- makes pipes easier
- e.g.,
glab mr list | fzf | grep -oE "^\S+" | glab mr view
- this is what atusy/gh-fzf internally does
- e.g.,
Description
This change adds support for a prefix in MR ID like below.
glab mr view \!1
Related Issue
Resolves #789 (closed)
How Has This Been Tested?
Run below on manjaro linux.
glab repo clone gitlab-org/gitlab-foss -- --depth 1
glab mr view "\!1"
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms)