Super-productivity: Add support for GitHub Enterprise

Created on 20 Jun 2019  Â·  6Comments  Â·  Source: johannesjo/super-productivity

I currently can't utilize this at work, as I cannot connect it to my companies self-hosted GitHub.

enhancement hacktoberfest help wanted medium

Most helpful comment

Hey thanks for opening up this issue. Currently I have no need for such a feature myself and a lot of other stuff to do for this project. But if anybody wants to work on this, I gladly accept Pull Requests.

All 6 comments

Hey thanks for opening up this issue. Currently I have no need for such a feature myself and a lot of other stuff to do for this project. But if anybody wants to work on this, I gladly accept Pull Requests.

Not sure if I am correct, but this might be very simple to do now. We just need to allow users to specifify the full path to the repository rather than just username/reponame, while of course providing a proper migration for these.

Well, if somebody still needs this, please get in touch. As mentioned above this should be relatively easy to implement.

I would definitely benefit from this with my company!

Not sure if I am correct, but this might be very simple to do now. We just need to allow users to specifify the full path to the repository rather than just username/reponame, while of course providing a proper migration for these.

Not sure if an implementation should check

  • if REPO is in format http(s)://hostname/username/repositoryName and http(s)://hostname is https://github.com strip it.
  • If hostname is not github.com use http(s)://hostname/api/v3/1 as API endpoint and strip the hostname

Or if adding the possibility to use a full path and using GitHub Enterprise instances should be two separate things.
One is the stripping of the URL in the repo input field
The second is the implementation of a checkbox "Use GitHub Enterprise" that makes an input field visible where the GHE instance can be entered and which changes the API endpoint

I'm a total novice and tried to take a look but am unsure what needs to be touched.
I guess GithubCfg and DEFAULT_GITHUB_CFG need to be extended but I don't know where the logic would be implemented.

If I can be of any help, and if its only testing I'd be happy.

1 https://developer.github.com/enterprise/2.21/v3/enterprise-admin/#endpoint-urls

This might collide with #670 (nothing that should be a problem – I am just pointing this out, because @sl5net is working on it currently).

I don't have a clear preference on what approach is preferable but lean slightly towards avoiding another config param if possible. But I think both are fine, so I'd opt for whatever is simpler.

The following files need to be adjusted as far as I can see:

  1. src/app/features/issue/providers/github/githu-api.service.ts => to make the API requests use the different base path
  2. src/app/features/issue/providers/github/github.const.ts => there is the form configuration (the app uses ngx-formly)
  3. Some translations if needed in en.json
  4. GithubCfg and DEFAULT_GITHUB_CFG only need to be adjusted when we add an additional config param.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

calvadosxo picture calvadosxo  Â·  4Comments

IT-Tool picture IT-Tool  Â·  3Comments

mbostanara picture mbostanara  Â·  3Comments

theCalcaholic picture theCalcaholic  Â·  4Comments

tiotrom picture tiotrom  Â·  4Comments