We currently support self-hosted GItHub Enterprise servers with custom URLs, configured with the Enterprise Base URL config setting. If the GH Enterprise instance is hosted by GitHub itself, the correct configuration is to leave the Enterprise Base URL config setting blank, so the plugin uses the default api.github.com host for the GitHub client.
We should make it clear in the following places to have this value blank in the case of GitHub hosting the Enterprise instance, and also rename the setting to Custom GitHub Enterprise URL:
We currently support self-hosted GItHub Enterprise servers with custom URLs, configured with the
Enterprise Base URL
config setting. If the GH Enterprise instance is hosted by GitHub itself, the correct configuration is to leave theEnterprise Base URL
config setting blank, so the plugin uses the defaultapi.github.com
host for the GitHub client.We should make it clear in the following places to have this value blank in the case of GitHub hosting the Enterprise instance, and also rename the setting to
Custom GitHub Enterprise URL
:/github setup
flowThere is also a config setting
Enterprise Upload URL
, that is always identical to theEnterprise Base URL
. I think we should just remove theEnterprise Upload URL
since this duplication just causes confusion. We append the suffixes on both of the URLs here https://github.com/mattermost/mattermost-plugin-github/blob/573e4a3daa663abfb44b2a56b6f0e3ca34d093ab/server/plugin/plugin.go#L193-L199And we are actually setting up the
uploadURL
path incorrectly. According to theNewEnterpriseClient
function we're calling here https://github.com/google/go-github/blob/466e52f0cd17ddbed7a4ac88307fc8fdaf440605/github/github.go#L378:/api/uploads
anyway