Skip to content

Add GitHub Enterprise support for GitHub Copilot provider#1491

Closed
Proxicon wants to merge 3 commits into
netclaw-dev:devfrom
Proxicon:feature/ghe-provider-support
Closed

Add GitHub Enterprise support for GitHub Copilot provider#1491
Proxicon wants to merge 3 commits into
netclaw-dev:devfrom
Proxicon:feature/ghe-provider-support

Conversation

@Proxicon

Copy link
Copy Markdown
Contributor

Related to #1456

When GHE host environment variables are set, provider add / TUI / device-code login use the configured enterprise GitHub host and API base for OAuth and Copilot token exchange. Without those variables, the provider keeps the existing github.com defaults, so standard GitHub Copilot users remain on the current flow.

Validated

  • GHE device-code login and live Copilot chat path
  • Default github.com endpoint behavior via focused regression tests
  • Provider CLI/TUI configuration paths
  • Copilot request header contract and token exchange behavior
  • dotnet build Netclaw.slnx
  • dotnet slopwatch analyze (reports existing unrelated timing-test warnings)
  • ./scripts/Add-FileHeaders.ps1 -Verify

Not included

  • No change to the default GitHub Copilot host when GHE env vars/options are absent
  • No persisted enterprise secrets; environment-token mode reads COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN at runtime

Tests:
With my GHE tenant env set TUI behavior:

Requests device login flow for the tenant:
image

Browser login:
image

Status netclaw status with daemon running:

.\Netclaw.exe status
overall: healthy
version: 0.24.2 (commit 68f0a7a, built 2026-06-25T14:36:18Z)
daemon: PID 47508, uptime 0m 15s, endpoint http://127.0.0.1:5199
persistence: Sqlite
memory: sqlite (healthy)
telemetry: disabled
model: gpt-5-mini (provider: github-copilot, context: 400,000 tokens)
  input: Text, Image
  output: Text
connectors:
- discord: disabled (disabled)
    Discord connector is disabled in configuration.
- mattermost: disabled (disabled)
    Mattermost connector is disabled in configuration.
- slack: disabled (disabled)
    Slack connector is disabled in configuration.
- tui: healthy (enabled)

Chat test:

image

@Proxicon
Proxicon force-pushed the feature/ghe-provider-support branch 3 times, most recently from 6af73f9 to eb8ad92 Compare June 25, 2026 16:22
…uth.

When GHE host environment variables are set, provider add / TUI / device-code login use the configured enterprise GitHub host and API base for OAuth and Copilot token exchange. Without those variables, the provider keeps the existing github.com defaults, so standard GitHub Copilot users should remain on the current flow.

Validated:
- GHE device-code login and live Copilot chat path
- default github.com endpoint behavior via focused regression tests
- provider CLI/TUI configuration paths
- Copilot request header contract and token exchange behavior

Not included:
- No change to the default GitHub Copilot host when GHE env vars/options are absent
- No persisted enterprise secrets; environment-token mode reads COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN at runtime
@Proxicon
Proxicon force-pushed the feature/ghe-provider-support branch from eb8ad92 to ecd3522 Compare June 25, 2026 16:26
@Aaronontheweb

Copy link
Copy Markdown
Collaborator

thanks @Proxicon !

@Proxicon

Copy link
Copy Markdown
Contributor Author

My pleasure @Aaronontheweb , ill work on the failed windows test runs/28184934691/job/83490200686 in GatewayRoutingContractTests

@Proxicon

Copy link
Copy Markdown
Contributor Author

My pleasure @Aaronontheweb , ill work on the failed windows test runs/28184934691/job/83490200686 in GatewayRoutingContractTests

Or actually does not look like the GHE provider work touched the contract relating to GatewayRoutingContractTest, StackGatewayContractTests, SpawnAgentStreamingTests

Perhaps a timing on the 3 seconds waits for sub agents that could be increased?

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

@Proxicon I appreciate your work and did a simplified version of it here #1509 - is there some way i can give you credit since I'm not merging this PR?

@Proxicon

Copy link
Copy Markdown
Contributor Author

@Proxicon I appreciate your work and did a simplified version of it here #1509 - is there some way i can give you credit since I'm not merging this PR?

Ah perfect! no problem thanks for keeping me posted - just glad were getting some GHE playtime with Netclaw :-)
Im happy for the quick turnaround otherwise! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants