Skip to content
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 GitHub Enterprise #277

Closed
prabu28 opened this issue Nov 27, 2020 · 5 comments · Fixed by #289
Closed

Support GitHub Enterprise #277

prabu28 opened this issue Nov 27, 2020 · 5 comments · Fixed by #289
Labels
feature A new feature or a feature request

Comments

@prabu28
Copy link

prabu28 commented Nov 27, 2020

push_new_version(, auth_token='XXXXXXX-XXXXXX-XXXXXXXXX', owner='appowner', name='MyAPI', branch='dev', domain='github.com')

is there a way to make publish work for github enterprise ? some thing like github.mycompany.com
i tried setting domain = github.mycompany.com in setup.cfg but that dint help .

@danth
Copy link
Member

danth commented Nov 28, 2020

Currently, Python Semantic Release does not support this.

If the GitHub Enterprise API uses the same endpoints as api.github.com, only under a different domain name, we can add a configuration option to set API_URL in hvcs.py.

@danth danth added feature A new feature or a feature request and removed question labels Nov 28, 2020
@danth danth changed the title How to use semantic-release for github enterprise Support GitHub Enterprise Nov 28, 2020
@prabu28
Copy link
Author

prabu28 commented Nov 30, 2020

Currently, Python Semantic Release does not support this.

If the GitHub Enterprise API uses the same endpoints as api.github.com, only under a different domain name, we can add a configuration option to set API_URL in hvcs.py.

thanks for the info @danth

wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 6, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

Fixes: python-semantic-release#277
@wyardley
Copy link
Contributor

wyardley commented Dec 6, 2020

I was looking at implementing this, using hvcs_domain as an option that would work for both GHE and Gitlab, but it seems that Gitlab uses CI_SERVER_HOST for this already.

https://github.com/relekang/python-semantic-release/blob/af4cd6a283ac8184637c438fc11f35aed7640cee/semantic_release/hvcs.py#L270

Also, presumably it may be necessary to use the domain from hvcs.py for the links in the changelog?

I'm thinking it's still cleanest to allow hvcs_domain to be configurable. I have some work in progress on this, and can push it and work on tests after we see what happens with #282.

May be a more tidy / efficient way to do some of this, but this is what I have thus far.
https://github.com/relekang/python-semantic-release/compare/master...wyardley:wyardley-hvcs-domain?expand=1

wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 12, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

Fixes: python-semantic-release#277
wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 12, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

Fixes: python-semantic-release#277
wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 12, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

This will also use the configured hostname (from either source) in the
changelog links

Fixes: python-semantic-release#277
wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 12, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

This will also use the configured hostname (from either source) in the
changelog links

Fixes: python-semantic-release#277
wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 13, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

This will also use the configured hostname (from either source) in the
changelog links

Fixes: python-semantic-release#277
wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 13, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

This will also use the configured hostname (from either source) in the
changelog links

Fixes: python-semantic-release#277
@wyardley
Copy link
Contributor

@prabu28: do you know if the API hostname is consistent? e.g., if you have a vanity domain of github.example.com for GHE, will you use github.example.com, or api.github.example.com for the API? It seems like some instances have the API hostname, but that maybe it should work without it, and that might be the safest / most consistent?

@prabu28
Copy link
Author

prabu28 commented Dec 13, 2020

@prabu28: do you know if the API hostname is consistent? e.g., if you have a vanity domain of github.example.com for GHE, will you use github.example.com, or api.github.example.com for the API? It seems like some instances have the API hostname, but that maybe it should work without it, and that might be the safest / most consistent?

hi @wyardley https://github.mycomany.com/api/v3 is our api url

wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 18, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

This will also use the configured hostname (from either source) in the
changelog links

Fixes: python-semantic-release#277
wyardley added a commit to wyardley/python-semantic-release that referenced this issue Dec 19, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

This will also use the configured hostname (from either source) in the
changelog links

Fixes: python-semantic-release#277
relekang pushed a commit that referenced this issue Dec 20, 2020
While Gitlab already has an env var that should provide the vanity URL,
this supports a generic 'hvcs_domain' parameter that makes the hostname
configurable for both GHE and Gitlab.

This will also use the configured hostname (from either source) in the
changelog links

Fixes: #277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or a feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants