Super-productivity: Allow on premise gitlab instance (selfhosted gitlab)

Created on 16 Apr 2020  路  9Comments  路  Source: johannesjo/super-productivity

Your Environment

  • Version used: latest debian package : 5.0.10
  • Operating System and version: Ubuntu 20.04
  • Desktop Environment: Gnome-Shell 3.36

Expected Behavior

  • When I had a project, I can setup gitlab integration just by setting username/project
  • It could be awesome if we could use a custom gitlab url

Current Behavior

  • Instead a username/project, we should add full url.
  • If full url is not written, just try to match username/project string
enhancement good first issue hacktoberfest help wanted medium

Most helpful comment

I am currently trying to have a kind of patch but I dot not know at all languages used in the project.
For the moment I just tried to hardcode my self hosted gitlab instance and I am trying to build.
If it works as I expect, I will try to match if input is "full.url/project/username" or "project/username".

If it works (what I do not really expect :)), I will push a MR.

Regards,

All 9 comments

Thanks for opening this up!

@MostafaAmin07 can I assign this issue to you?

I am currently trying to have a kind of patch but I dot not know at all languages used in the project.
For the moment I just tried to hardcode my self hosted gitlab instance and I am trying to build.
If it works as I expect, I will try to match if input is "full.url/project/username" or "project/username".

If it works (what I do not really expect :)), I will push a MR.

Regards,

@fulljackz That would be awesome!! You should be able to find all relevant stuff here:
https://github.com/johannesjo/super-productivity/tree/master/src/app/features/issue/providers/gitlab

For development please follow the instructions in the readme.

News from the front.
I just checked the code in gitlab.const.ts and change the GITLAB_API_BASE_URL to mine.
I just build and try to run the app and it's working !
I can poll issues from my gitlab instance and I can view them in the webapp.

The next question is (and I think what the answer is) : is it possible to push issues from super-productivity to gitlab ? It would be a powerfull thing !

You mean to create new issues from the app? Not yet, but we should make it a feature :)

Yes, a kind of bidirectionnal way.
I think that a full "interface" with gitlab should be pretty cool :

  • issue create / close
  • interactions with time tracking functions into gitlab
  • push comment into issue

If it has a sense for you or others, do we have to create an issue for each ?

Makes sense to me to have something like this (I am certainly not against it), but I think it is hard to figure out the right way to do it. You absolutely don't want issues to be created or updated accidentally as Super Productivity messing up your teams Scrum Board could potentially be embarrassing. Avoiding that should be a top priority, when adding this. So it probably makes sense to keep this as simple and be implemented with a warning or confirm or two :)

I will try to match if input is "full.url/project/username" or "project/username".

@fulljackz Instead of trying to match on full URL vs just project/username, why not just add a check for "use custom URL", that when selected, shows a field to enter a hostname of the custom gitlab instance?

Edit: or maybe the field accepts scheme + hostname, for example, https://mygitlab.example.local

I try to add my gitlab url but It's not work. My project URL is deep: https://internal.host/gitlab/group1/group2/group3/project.

I see in the debug console it's rewritten to https://internal.host/api/v4/projects/gitlab%2Fgroup1%2Fgroup2%2Fgroup3%2Fproject/issues
I know you want to solve with one URL but why? Why not 2? I mean first is the base URL (ex: https://gitlab.com/ or https://internal.host/gitlab/) and another to the project.

I think it's a fast and simple solution instead of "try to find the base URL and then the API"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

generic-user picture generic-user  路  3Comments

fkohrt picture fkohrt  路  3Comments

Kl4tch picture Kl4tch  路  3Comments

wimel picture wimel  路  3Comments

mbostanara picture mbostanara  路  3Comments