Skip to content

Comments

fix: correct 'GithubToken' casing to 'GitHubToken' in .NET and Go#541

Merged
SteveSandersonMS merged 3 commits intomainfrom
stevesa/fix-github-casing
Feb 23, 2026
Merged

fix: correct 'GithubToken' casing to 'GitHubToken' in .NET and Go#541
SteveSandersonMS merged 3 commits intomainfrom
stevesa/fix-github-casing

Conversation

@SteveSandersonMS
Copy link
Contributor

Rename GithubToken to GitHubToken (capital H) across all .NET and Go type definitions, client code, tests, test scenarios, and READMEs to match the correct 'GitHub' brand casing.

This is a clean recreation of the casing fix from #453 (by @aaronpowell), but:

Not updating Python and TypeScript as they use lowercase-first properties (github_token / githubToken), which are already correct per language convention.

Rename GithubToken to GitHubToken (capital H) across all .NET and Go
type definitions, client code, tests, test scenarios, and READMEs to
match the correct 'GitHub' brand casing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SteveSandersonMS SteveSandersonMS requested a review from a team as a code owner February 23, 2026 12:09
Copilot AI review requested due to automatic review settings February 23, 2026 12:09
…ibility

Adds a deprecated GithubToken property that forwards to GitHubToken,
allowing existing consumers to migrate without breaking changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a 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 corrects the public option/property casing from GithubToken to GitHubToken across the Go and .NET SDKs and their related scenario programs/tests/READMEs, aligning with GitHub brand casing.

Changes:

  • Renames GithubTokenGitHubToken in Go ClientOptions and all usages (client logic, tests, e2e harness).
  • Renames GithubTokenGitHubToken in .NET CopilotClientOptions and all usages (client logic, tests, e2e harness).
  • Updates Go/.NET scenario programs and READMEs to use the corrected name.

Reviewed changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/scenarios/transport/stdio/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/transport/stdio/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/tools/virtual-filesystem/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/tools/virtual-filesystem/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/tools/tool-filtering/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/tools/tool-filtering/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/tools/skills/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/tools/skills/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/tools/no-tools/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/tools/no-tools/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/tools/mcp-servers/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/tools/mcp-servers/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/tools/custom-agents/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/tools/custom-agents/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/sessions/streaming/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/sessions/streaming/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/sessions/session-resume/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/sessions/session-resume/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/sessions/infinite-sessions/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/sessions/infinite-sessions/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/sessions/concurrent-sessions/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/sessions/concurrent-sessions/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/prompts/system-message/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/prompts/system-message/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/prompts/reasoning-effort/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/prompts/reasoning-effort/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/prompts/attachments/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/prompts/attachments/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/modes/minimal/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/modes/minimal/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/modes/default/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/modes/default/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/callbacks/user-input/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/callbacks/user-input/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/callbacks/permissions/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/callbacks/permissions/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/callbacks/hooks/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/callbacks/hooks/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/bundling/fully-bundled/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/bundling/fully-bundled/csharp/Program.cs Updates scenario client options to use GitHubToken.
test/scenarios/auth/gh-app/go/main.go Updates scenario client options to use GitHubToken.
test/scenarios/auth/gh-app/csharp/Program.cs Updates scenario client options to use GitHubToken.
go/types.go Renames exported ClientOptions field and updates comments to GitHubToken.
go/internal/e2e/testharness/context.go Updates e2e harness client options to use GitHubToken.
go/client_test.go Updates auth option tests and expected messages to GitHubToken.
go/client.go Updates auth validation/env wiring to use GitHubToken naming.
go/README.md Updates documentation to reference GitHubToken.
dotnet/test/Harness/E2ETestContext.cs Updates e2e harness client options to use GitHubToken.
dotnet/test/CloneTests.cs Updates clone coverage to assert GitHubToken.
dotnet/test/ClientTests.cs Updates auth option tests to GitHubToken.
dotnet/src/Types.cs Renames CopilotClientOptions property and clone logic to GitHubToken.
dotnet/src/Client.cs Updates auth validation/env wiring to use GitHubToken naming.
dotnet/README.md Updates documentation to reference GitHubToken.

Use PermissionRequest and PermissionRequestResult types instead of
plain dict to fix ty type checker errors from stricter enforcement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/fix-github-casing branch from 534ae40 to f0dcc71 Compare February 23, 2026 12:17
@SteveSandersonMS SteveSandersonMS merged commit 99c7c52 into main Feb 23, 2026
34 checks passed
@SteveSandersonMS SteveSandersonMS deleted the stevesa/fix-github-casing branch February 23, 2026 12:22
@github-actions
Copy link

Cross-SDK Consistency Review ✅

Thank you for fixing the GitHub brand casing! I've reviewed this PR for consistency across all four SDK implementations.

✅ Correct Language-Specific Casing

The PR correctly maintains language-appropriate naming conventions:

  • TypeScript: githubToken (camelCase) - already correct ✅
  • Python: github_token (snake_case) - already correct ✅
  • Go: GithubTokenGitHubToken (PascalCase for exported fields) ✅
  • .NET: GithubTokenGitHubToken (PascalCase for public properties) ✅

⚠️ Minor Inconsistency: Backward Compatibility

There's a small difference in how Go and .NET handle backward compatibility:

  • .NET (commit 03acc9b): Provides an [Obsolete] property alias:

    [Obsolete("Use GitHubToken instead.", error: false)]
    public string? GithubToken
    {
        get => GitHubToken;
        set => GitHubToken = value;
    }
  • Go: No backward compatibility mechanism (breaking change for users who set GithubToken in ClientOptions)

Recommendation: While Go's struct fields can't be aliased like C# properties, consider documenting this as a breaking change in the release notes or changelog, since users who explicitly set GithubToken will get compilation errors after upgrading. Given that:

  1. The SDK is still in preview (v0.1.x)
  2. GithubToken was only introduced ~25 days ago (Jan 29)
  3. Go modules use semantic versioning where pre-1.0 versions accept breaking changes

This is likely acceptable, but it should be clearly communicated to users.

Python Session Change

The python/copilot/session.py change (adding type hints to _handle_permission_request) appears to be an unrelated improvement and doesn't affect cross-SDK consistency for the GitHub token casing fix.


Overall: The changes maintain excellent cross-SDK consistency while respecting each language's conventions. Nice work! 🎉

AI generated by SDK Consistency Review Agent

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.

1 participant