Soenneker.GitHub.Repositories 4.0.1237

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.GitHub.Repositories --version 4.0.1237
                    
NuGet\Install-Package Soenneker.GitHub.Repositories -Version 4.0.1237
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.GitHub.Repositories" Version="4.0.1237" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.GitHub.Repositories" Version="4.0.1237" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.GitHub.Repositories" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.GitHub.Repositories --version 4.0.1237
                    
#r "nuget: Soenneker.GitHub.Repositories, 4.0.1237"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.GitHub.Repositories@4.0.1237
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.GitHub.Repositories&version=4.0.1237
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.GitHub.Repositories&version=4.0.1237
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1250 0 9/5/2026
4.0.1249 0 9/5/2026
4.0.1248 18 9/5/2026
4.0.1247 40 9/5/2026
4.0.1246 52 9/5/2026
4.0.1245 77 9/4/2026
4.0.1244 109 9/4/2026
4.0.1243 76 9/4/2026
4.0.1242 118 9/4/2026
4.0.1241 55 9/4/2026
4.0.1240 34 9/4/2026
4.0.1239 97 9/4/2026
4.0.1238 32 9/4/2026
4.0.1237 105 9/4/2026
4.0.1236 72 9/4/2026
4.0.1235 80 9/4/2026
4.0.1233 82 9/4/2026
4.0.1232 40 9/4/2026
4.0.1231 92 9/4/2026
4.0.1230 96 9/3/2026
Loading failed

Update dependency Soenneker.Extensions.Object to 4.0.4329 (#1746)