-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Support "GitLab-specific references" passed via CLI? #822
Comments
A simple paste won't work, because without escaping, both I'm not sure how much of a showstopper that is - on the one hand, adding quotes or $ lab issue show #123
2022/04/08 01:01:48 ERROR: issue_show.go:35: Specify <id> of issue to be show |
Oh, of course. I hadn't thought of that! Good call. This sent me down a bit of a rabbit hole, though. It looks like different shells handle these differently: bash won't natively pass In general, double-click on macOS will select just the digits w/o the prefix, so I can easily copy/paste a single MR/issue id w/o the prefix. The specific use case that spurred me to open the issue was copying a preexisting list of MRs in Anyway, just more fodder for discussion. Thanks for considering! |
Tinkering tinkering ... I played w/ this and it seems like |
Oh, it's not up to me to consider the issue, I was only commenting from the sidelines 😂 (while being sympathetic to the suggestion) |
GL supports many different special "references" in markdown. These are the shortcuts like
#number
to refer to an issue or!number
to refer to an MR. Although it doesn't come up super often, there are semi-regular cases where I want to paste something into the cli likelab mr b <paste>
but my clipboard includes the!
. As we've already documented, I'm lazy and I think it would be really great oflab
was able to deal w/ something likelab mr show !123
.Although there are many different shorthand references, I suspect that supporting issues and MRs would cover most of the use-cases.
This could be as simple as an update to
lab/cmd/util.go
Lines 290 to 306 in 73bada2
[#!]
, or it could be more robust where an error is thrown if, eg, we try calllab mr b #123
(ie I try to browse to an MR but give an issue ref).If there's interest in this, I can take a whack at it. If the add'l "you're trying to browse to a mr but you passed an issue" is desired, that might extend beyond the scope of my abilities, though.
The text was updated successfully, but these errors were encountered: