mattermost / mattermost-plugin-github

GitHub plugin for Mattermost
Apache License 2.0
158 stars 153 forks source link

Explain in docs not to fill out the `Enterprise Base URL` config setting if the GH Enterprise instance is hosted on GitHub's domain #714

Open mickmister opened 1 year ago

mickmister commented 1 year ago

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:


There is also a config setting Enterprise Upload URL, that is always identical to the Enterprise Base URL. I think we should just remove the Enterprise 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-L199

And we are actually setting up the uploadURL path incorrectly. According to the NewEnterpriseClient function we're calling here https://github.com/google/go-github/blob/466e52f0cd17ddbed7a4ac88307fc8fdaf440605/github/github.go#L378:

LREGS commented 10 months ago

Can I work on this please?

mickmister commented 10 months ago

Absolutely, thanks @LREGS!