Soenneker.GitHub.Client
4.0.2645
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.GitHub.Client --version 4.0.2645
NuGet\Install-Package Soenneker.GitHub.Client -Version 4.0.2645
<PackageReference Include="Soenneker.GitHub.Client" Version="4.0.2645" />
<PackageVersion Include="Soenneker.GitHub.Client" Version="4.0.2645" />
<PackageReference Include="Soenneker.GitHub.Client" />
paket add Soenneker.GitHub.Client --version 4.0.2645
#r "nuget: Soenneker.GitHub.Client, 4.0.2645"
#:package Soenneker.GitHub.Client@4.0.2645
#addin nuget:?package=Soenneker.GitHub.Client&version=4.0.2645
#tool nuget:?package=Soenneker.GitHub.Client&version=4.0.2645
Soenneker.GitHub.Client
Provides cached Octokit GitHubClient instances with credentials isolated by token.
Installation
dotnet add package Soenneker.GitHub.Client
Configure and register
{
"GH": {
"Token": "your-github-token"
}
}
using Soenneker.GitHub.Client.Registrars;
services.AddGitHubClientUtilAsSingleton();
Keep the token in secret storage. Its repository and organization permissions determine what Octokit calls can do.
Use the configured client
using Soenneker.GitHub.Client.Abstract;
public sealed class RepositoryReader(IGitHubClientUtil clients)
{
public async Task<Repository> Get(
string owner,
string repository,
CancellationToken cancellationToken)
{
GitHubClient client = await clients.Get(cancellationToken);
return await client.Repository.Get(owner, repository);
}
}
Get() uses GH:Token. Get(token) supports an explicit token. Calls with the same token reuse one client; different tokens receive different clients, preventing one caller's credentials from leaking into another caller's requests.
The singleton registration is appropriate for application-wide reuse. A scoped registration is also available when an application intentionally wants a separate per-scope cache.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Octokit (>= 14.0.0)
- Soenneker.Extensions.Configuration (>= 4.0.912)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.GitHub.Client:
| Package | Downloads |
|---|---|
|
Soenneker.GitHub.BranchPolicies
Reads, updates, and removes GitHub branch protection rules. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.2653 | 56 | 11/11/2026 |
| 11.0.2652 | 81 | 11/11/2026 |
| 11.0.2651 | 93 | 11/10/2026 |
| 11.0.2650 | 77 | 11/10/2026 |
| 11.0.2649 | 145 | 10/27/2026 |
| 11.0.2647 | 129 | 10/26/2026 |
| 4.0.2645 | 135 | 10/26/2026 |
| 4.0.2644 | 941 | 10/15/2026 |
| 4.0.2629 | 224 | 10/11/2026 |
| 4.0.2628 | 442 | 10/9/2026 |
| 4.0.2627 | 143 | 10/1/2026 |
| 4.0.2626 | 270 | 9/25/2026 |
| 4.0.2625 | 128 | 9/25/2026 |
| 4.0.2624 | 127 | 9/24/2026 |
| 4.0.2623 | 161 | 9/16/2026 |
| 4.0.2622 | 135 | 9/16/2026 |
| 4.0.2621 | 137 | 9/15/2026 |
| 4.0.2620 | 122 | 9/15/2026 |
| 4.0.2619 | 169 | 9/13/2026 |
| 4.0.2618 | 151 | 9/13/2026 |
Updated NuGet packages