Describe the solution you'd like
I've started experimenting with this awesome tool at work, and it's going great! One thing however I've noticed is that I cannot use the pull request feature.
I'm using it in a closed off network, with a custom gitlab setup, so of course the built in gitlab url doesn't appear, nor would it help if it did.
It would be awesome if the config could accept some "name: url:" parameters for custom pull request links.
Thanks again for the project. I love the simplicity and usability!
Yes this is an issue I have as well! Having this configurable from config.yml would be very useful!
I would like it as well!
we could also maybe detect what kind of server we are dealing with on the fly:
https://server.url/api/v4 and https://server.url/api/v4/versionhttps://server.url/api/v1/version@mjarkk that sounds good to me. Are there any cases where we wouldn't be able to derive the url from the repo itself? If there are, then we'll need to add support for per-repo urls in the config.
ya there are some caveats to this, this won't work if:
But for those cases we can show a popup with a list of the git servers we support.
And i don't think there are so meany server who fall in that section.
- The git server has a different domain name for git over ssh
My case exactly. So to solve that, I came up with this change. The config.yml file looks like this:
services:
"gitlab.<myWorkDomain>": "https://gitlab.<myWorkDomain>/%s/%s/merge_requests/new?merge_request[source_branch]=%s"
"git.<myWorkDomain>": "https://gitlab.<myworkDomain>/%s/%s/merge_requests/new?merge_request[source_branch]=%s"
That's definitely not the best way as it exposes the format string, which can lead to awfully wrong URLs, and also tightly couples the config string . So, some sort of refactoring is needed, e.g. create a ServiceType with a domain-variable format string, and then use those on the Service (fixed and user-added) by just pointing the type.
Here's the refactored option, which allows this kind of configuration:
services:
"gitlab.<myWorkDomain>": "gitlab:gitlab.<myWorkDomain>"
"git.<myWorkDomain>": "gitlab:gitlab.<myWorkDomain>"
Nice! No more gory details on the configuration 馃槃
P.S.: Also I've fixed the getRepoInfoFromURL function. as GitLab allows grouping, e.g. team/group-of-projects/project1. Let me know if I should cherry-pick that into a separate PR.
@wwmoraes did you submit a merge request for this?
@craftyguy no I didn鈥檛 as I diverged my attention on other matters. I鈥檒l pick it up in the morning, do some rebasing and submit 馃殌
Sent with GitHawk