vscode-gitlens
vscode-gitlens copied to clipboard
Improve Focus View response when attempting to `Connect to GitHub` with invalid settings.json
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:
- Include a forward slash at the end of your domain for gitlens.remotes for a GitHub Enterprise instance (see example)
- Open a GitHub Enterprise repository and then open the Focus View
- Select
Connect to GitHub - 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
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!
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