mattermost / mattermost/mattermost-plugin-github

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

Open
#714 2 comments 0 reactions 1 assignee View on GitHub

@LREGS is already working on this.

Since Feb 5, 2024.

Difficulty/1:Easy Good First Issue Hacktoberfest Help Wanted Tech/Go Type/Enhancement
Dominant language
Go
Stars
179
Forks
180
Avg merge
1d 16h
Merged PRs (30d)
13

Description

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:

  • README.md
  • /github setup flow
  • plugin config settings page

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:

  • We don't need to apply those suffixes
  • It should be /api/uploads anyway

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.