Soenneker.GitHub.Repositories
4.0.1217
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.GitHub.Repositories --version 4.0.1217
NuGet\Install-Package Soenneker.GitHub.Repositories -Version 4.0.1217
<PackageReference Include="Soenneker.GitHub.Repositories" Version="4.0.1217" />
<PackageVersion Include="Soenneker.GitHub.Repositories" Version="4.0.1217" />
<PackageReference Include="Soenneker.GitHub.Repositories" />
paket add Soenneker.GitHub.Repositories --version 4.0.1217
#r "nuget: Soenneker.GitHub.Repositories, 4.0.1217"
#:package Soenneker.GitHub.Repositories@4.0.1217
#addin nuget:?package=Soenneker.GitHub.Repositories&version=4.0.1217
#tool nuget:?package=Soenneker.GitHub.Repositories&version=4.0.1217
Soenneker.GitHub.Repositories
Creates, discovers, configures, and deletes GitHub repositories through the REST and GraphQL APIs.
Installation
dotnet add package Soenneker.GitHub.Repositories
Configure and register
{
"GH": {
"Token": "your-github-token"
}
}
using Soenneker.GitHub.Repositories.Registrars;
services.AddGitHubRepositoriesUtilAsSingleton();
The token's repository and organization permissions determine which operations succeed. Creation, settings changes, sponsorship changes, and deletion require write or administration permissions appropriate to the target.
Discover repositories
FullRepository? repository = await repositories.GetByName(
"example-org", "example-repository", cancellationToken);
List<MinimalRepository> recent = await repositories.GetAllForOwner(
"example-org",
startAt: DateTimeOffset.UtcNow.AddMonths(-1),
cancellationToken: cancellationToken);
GetByName() returns null only for GitHub's 404 response. Authentication, permission, rate-limit, and transport failures propagate. GetAllForOwnerIncrementally() yields pages as they arrive and applies the optional creation-date window.
Create and configure
FullRepository created = await repositories.CreateForOrg(
org: "example-org",
name: "example-repository",
description: "Example service",
isPrivate: true,
allowSquashMerge: true,
cancellationToken: cancellationToken);
await repositories.ReplaceTopics(
"example-org", "example-repository",
["dotnet", "service"],
cancellationToken);
ReplaceTopics() replaces the entire topic collection; passing an empty list clears it. CreateUnique() probes the base name and numeric suffixes, then creates the first name reported as absent. A concurrent creator can still win that race and cause GitHub to reject the request.
Mutating operations
ToggleAutoMergeOnAllRepos() attempts every repository and throws an AggregateException afterward if any updates failed, so partial completion is visible. ToggleSponsorships() uses GitHub's GraphQL mutation over the same authenticated HTTP transport.
DeleteIfExists() permanently deletes the repository when GitHub confirms it exists. It does not treat access failures as absence; verify the owner and repository before calling it.
| 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
- Soenneker.Extensions.Enumerable.String (>= 4.0.1425)
- Soenneker.GitHub.ClientUtil (>= 4.0.621)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Soenneker.GitHub.Repositories:
| Package | Downloads |
|---|---|
|
Soenneker.GitHub.Repositories.Discussions
Creates, lists, and deletes GitHub repository discussions. |
|
|
Soenneker.GitHub.Artifacts
Lists and deletes GitHub Actions artifacts across repositories. |
|
|
Soenneker.GitHub.Repositories.Runs
Inspects GitHub check runs, commit statuses, and Actions workflow runs |
|
|
Soenneker.GitHub.Repositories.Issues
Retrieves and logs open GitHub issues for repositories and owners. |
|
|
Soenneker.GitHub.Repositories.Security
Retrieves and logs GitHub repository security alerts |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1230 | 0 | 9/3/2026 |
| 4.0.1229 | 0 | 9/3/2026 |
| 4.0.1228 | 29 | 9/3/2026 |
| 4.0.1227 | 60 | 9/3/2026 |
| 4.0.1226 | 233 | 9/1/2026 |
| 4.0.1225 | 84 | 9/1/2026 |
| 4.0.1223 | 170 | 9/1/2026 |
| 4.0.1222 | 206 | 8/31/2026 |
| 4.0.1221 | 169 | 8/31/2026 |
| 4.0.1220 | 162 | 8/31/2026 |
| 4.0.1219 | 74 | 8/31/2026 |
| 4.0.1218 | 226 | 8/31/2026 |
| 4.0.1217 | 120 | 8/31/2026 |
| 4.0.1216 | 64 | 8/31/2026 |
| 4.0.1215 | 306 | 8/30/2026 |
| 4.0.1214 | 87 | 8/30/2026 |
| 4.0.1213 | 257 | 8/30/2026 |
| 4.0.1212 | 389 | 8/30/2026 |
| 4.0.1211 | 81 | 8/30/2026 |
| 4.0.1210 | 105 | 8/30/2026 |
Update dependency Soenneker.GitHub.ClientUtil to 4.0.621 (#1726)