LSP-copilot
                                
                                 LSP-copilot copied to clipboard
                                
                                    LSP-copilot copied to clipboard
                            
                            
                            
                        support github enterprise setting
Untested
Should work out of the box. I am on Paternity leave and wont be able to test for ~6 weeks
Maybe @raffeyang can test this.
I tested and found that it doesn't seem to work properly. If you need it, I can provide an enterprise test link.My config is below
{
	"settings": {
		"github-enterprise": {
			"uri": "http://XXX@XXX:28443"
		}
	}
}
I should be able to test this today. Thanks
Update, not sure why this isnt working. I've returned to work and I am still investigating
I tested and found that it doesn't seem to work properly. If you need it, I can provide an enterprise test link.My config is below
{ "settings": { "github-enterprise": { "uri": "http://XXX@XXX:28443" } } }
I'll push some changes. I have no way to test though
hi @raffeyang , could you test against this branch again?
@raffeyang This appears to be working now. But still need confirmation from you. From my testing, once you change the URL Copilot leverages the new URL for Auth.
Just following up here.
Copilot monitors these settings keys
:: [23:52:53.476] <-- LSP-copilot workspace/configuration (0): {'items': [{'section': 'http'}, {'section': 'github-enterprise'}, {'section': 'github.copilot'}]}
:: [23:52:53.476] >>> LSP-copilot (0) (duration: 0ms): [None, None, None]
- http
- github-enterprise
- github.copilot
When adding the setting authProvider: "github-enterprise" and then adding the settings below
		"github-enterprise": {
			"url": "https://github.com",
		},
we can see copilot attempting to re-authenticate
:: [23:54:50.107] <-- LSP-copilot workspace/configuration (0): {'items': [{'section': 'http'}, {'section': 'github-enterprise'}, {'section': 'github.copilot'}]}
:: [23:54:50.107] >>> LSP-copilot (0) (duration: 0ms): [None, {'url': 'https://github.com'}, None]
:: [23:54:50.108] <<< LSP-copilot (2) (duration: 110ms): {'version': '1.211.0', 'buildType': 'prod', 'runtimeVersion': 'node/18.17.1'}
:: [23:54:50.140] <<< LSP-copilot (4) (duration: 142ms): 'OK'
:: [23:54:50.140] <<< LSP-copilot (5) (duration: 142ms): 'OK'
:: [23:54:51.161] <-  LSP-copilot featureFlagsNotification: {'rt': True, 'sn': False, 'chat': True}
:: [23:54:51.161] <-  LSP-copilot featureFlagsNotification: {'rt': True, 'sn': False, 'chat': True}
:: [23:54:51.161] <-  LSP-copilot featureFlagsNotification: {'rt': True, 'sn': False, 'chat': True}
:: [23:54:51.162] <<< LSP-copilot (3) (duration: 1164ms): {'status': 'OK', 'user': 'terminalfi'}
We can see that it worked still, even though the URL isn't for a login domain or enterprise. That is because copilot has 2 features
- It validates the URL before auth
- Has fall backs if the URL isn't authorized
What does this mean? I don't know to be honest. It seems there is some restrictions on the enterprise url value. But at the end of the day, this is working from a perspective that we send copilot the expected data.
@jfcherng If no objections, we can merge this. Thoughts?
@jfcherng If no objections, we can merge this. Thoughts?
let's go