-
Notifications
You must be signed in to change notification settings - Fork 834
Correct casing of GitHub in types for .NET and Go #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Go and .NET SDK public option names to use the correct “GitHub” casing (and aligns docs/tests accordingly), plus includes a number of documentation formatting tweaks.
Changes:
- Rename auth option from
GithubToken→GitHubTokenin Go and .NET types and update call sites/tests. - Update docs examples to use the corrected casing for Go/.NET.
- Reformat multiple markdown files (spacing, tables, code blocks).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| go/types.go | Renames exported ClientOptions field to GitHubToken. |
| go/client.go | Updates auth validation/CLI env wiring to use GitHubToken. |
| go/client_test.go | Updates tests and expected panic message text for new casing. |
| go/internal/e2e/testharness/context.go | Updates E2E harness to set GitHubToken in CI. |
| go/README.md | Updates option documentation and adds formatting notes. |
| dotnet/src/Types.cs | Renames public CopilotClientOptions property to GitHubToken. |
| dotnet/src/Client.cs | Updates validation/CLI env wiring to use GitHubToken. |
| dotnet/test/ClientTests.cs | Updates tests for new casing. |
| dotnet/test/Harness/E2ETestContext.cs | Updates E2E harness to set GitHubToken in CI. |
| dotnet/README.md | Updates option documentation and formatting. |
| docs/guides/setup/github-oauth.md | Updates Go/.NET code samples to GitHubToken and reformats examples/tables. |
| docs/debugging.md | Updates Go/.NET snippets to GitHubToken and formatting. |
| docs/auth/index.md | Reformats authentication docs (tables/spacing) and updates samples. |
| .github/agents/docs-maintenance.agent.md | Updates documentation-maintenance agent instructions and code-fence formatting. |
Comments suppressed due to low confidence (3)
.github/agents/docs-maintenance.agent.md:267
- This code block is opened with a triple-backtick fence earlier (
), but it’s closed here with four backticks (````), which breaks markdown parsing. The closing fence should use the same number of backticks as the opener (likelyhere since no nesting is needed).
**.github/agents/docs-maintenance.agent.md:285**
* This `bash` code block is opened with ```bash but closed with ````. The fence length must match; use ``` to close (or change the opening fence to ````bash if nesting is required, which doesn’t appear to be the case here).
```
**.github/agents/docs-maintenance.agent.md:92**
* The outer fenced markdown block (opened with ````markdown) is being closed at line 92, but the example continues afterward; this leaves the rest of the example outside the fence and also makes the later closing fence inconsistent. The plan example should remain inside the outer fence until the end of the example and be closed with the same number of backticks.
```
// Should be:
await client.createSession();
```
</details>
| ``` | ||
|
|
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This closing code fence (``` at line 115) no longer matches any opening fence after the earlier change to use ````markdown; it will break markdown rendering. Remove this stray fence or change it to the correct matching closing fence if the outer example block is intended to end here.
This issue also appears in the following locations of the same file:
- line 267
- line 285
- line 88
| ``` |
| // When provided, the token is passed to the CLI server via environment variable. | ||
| // This takes priority over other authentication methods. | ||
| GithubToken string | ||
| GitHubToken string |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming the exported ClientOptions field from GithubToken to GitHubToken is a breaking API change for existing Go consumers (their code will no longer compile). Consider keeping a deprecated GithubToken alias field (with a // Deprecated: use GitHubToken. comment) and mapping it to GitHubToken inside NewClient (with a clear precedence rule if both are set).
| GitHubToken string | |
| GitHubToken string | |
| // Deprecated: use GitHubToken. | |
| GithubToken string |
| /// When provided, the token is passed to the CLI server via environment variable. | ||
| /// This takes priority over other authentication methods. | ||
| /// </summary> | ||
| public string? GithubToken { get; set; } | ||
| public string? GitHubToken { get; set; } |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing CopilotClientOptions.GithubToken to GitHubToken is a breaking public API change for .NET callers. Consider keeping a [Obsolete] GithubToken property as a wrapper around GitHubToken (get/set forwarding) to preserve source compatibility while guiding users to the corrected casing.
GitHub should have a capital H not lowercase, so correcting that in the type definitions for .NET and Go.
Not updating Python and TypeScript as they default to a lowercase first letter for properties, and that would result in
gitHubwhich is equally incorrect.