gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
8.97k stars 1.31k forks source link

Improve Focus View response when attempting to `Connect to GitHub` with invalid settings.json #3168

Open jkelroy opened 7 months ago

jkelroy commented 7 months ago

When you have an invalid settings.json config for GitHub Enterprise and you open up the Focus View, selecting Connect to GitHub no-ops. Instead, we should be pointing the user to update their settings.json so they can connect the integration.

To repro:

  1. Include a forward slash at the end of your domain for gitlens.remotes for a GitHub Enterprise instance (see example)
  2. Open a GitHub Enterprise repository and then open the Focus View
  3. Select Connect to GitHub
  4. There is no response

Example of an invalid settings.json - removing the / resolves this and allows you to connect the integration.

{
  "gitlens.remotes": [
    {
      "domain": "githubenterprise-url.com/",
      "type": "GitHub"
    }
  ]
}

https://github.com/gitkraken/vscode-gitlens/assets/27739784/9ef60e29-7c37-4cde-ab32-ab8114b866d3

tprather commented 7 months ago

Thanks, @jkelroy!

This was precisely the problem. Adding the gitlen.remotes entry in setup.json caused the Focus "Connect to GitHub" to ask me for a github PAT which then connected.

Thanks!

axosoft-ramint commented 7 months ago

Noting that in addition to in-client messaging updates to make it clearer in general when GitLens remote settings may be misconfigured, we should provide more detailed instructions about this setting (especially how to format each property) in the help center docs