Open perlun opened 5 years ago
Thanks for the contribution. Your opinion is very informative.
I added the ability to virtually define gitlab domain as a solution. You can try this on the following branch.
https://github.com/lighttiger2505/lab/pull/77
The virtual gitlab domain feature adds the domain set in the lab command's configuration file to gitlab remote automatic detection.
profiles:
gitlab.com:
token: **********************
default_group: ""
default_project: ""
default_assignee_id: 123
git.foo.bar.jp: # The name is not gitlab
token: **********************
default_group: ""
default_project: ""
default_assignee_id: 345
For example, git.foo.bar.jp
is not gitlab, but lab command detects it.
Thanks @lighttiger2505, much appreciated!
How would this work in the lab browse
scenario when no config file exists from beforehand? I think it would be great to be able do something like lab browse --remote upstream
or similar, to let it auto-create the config based on the named remote.
What do you think? Just trying to make this feature as easy as possible for people to use.
Thanks for an interesting tool!
For me, the usefulness is a bit limited since our (internal) GitLab server is not named
gitlab.foo.bar
but insteadgit.foo.bar
, so the heuristics for auto-detecting the GitLab remote does not workI did the following local tweak which works for me but is rather silly (I have an
origin
remote which is my personal fork and anupstream
remote which is the main repository). If we could find a way to conditionalize this (perhaps with a config parameter or ENV variable), it would be great and increase the usefulness of the tool. Do you have any ideas?