Soenneker.GitHub.Repositories.Readmes
4.0.1029
Prefix Reserved
dotnet add package Soenneker.GitHub.Repositories.Readmes --version 4.0.1029
NuGet\Install-Package Soenneker.GitHub.Repositories.Readmes -Version 4.0.1029
<PackageReference Include="Soenneker.GitHub.Repositories.Readmes" Version="4.0.1029" />
<PackageVersion Include="Soenneker.GitHub.Repositories.Readmes" Version="4.0.1029" />
<PackageReference Include="Soenneker.GitHub.Repositories.Readmes" />
paket add Soenneker.GitHub.Repositories.Readmes --version 4.0.1029
#r "nuget: Soenneker.GitHub.Repositories.Readmes, 4.0.1029"
#:package Soenneker.GitHub.Repositories.Readmes@4.0.1029
#addin nuget:?package=Soenneker.GitHub.Repositories.Readmes&version=4.0.1029
#tool nuget:?package=Soenneker.GitHub.Repositories.Readmes&version=4.0.1029
Soenneker.GitHub.Repositories.Readmes
Create or replace a repository's README.md with a GitHub commit on the branch you choose.
Installation
dotnet add package Soenneker.GitHub.Repositories.Readmes
Configuration
{
"GH": {
"Token": "github-token"
}
}
The token must have repository contents write access.
Registration
services.AddGitHubRepositoriesReadmesUtilAsSingleton();
Use AddGitHubRepositoriesReadmesUtilAsScoped() for a scoped consumer.
Usage
public sealed class RepositoryReadmeService
{
private readonly IGitHubRepositoriesReadmesUtil _readmes;
public RepositoryReadmeService(IGitHubRepositoriesReadmesUtil readmes)
{
_readmes = readmes;
}
public ValueTask Publish(
string markdown,
CancellationToken cancellationToken = default)
{
return _readmes.Upsert(
owner: "soenneker",
name: "example-repository",
commitMessage: "Update README",
content: markdown,
branch: "main",
cancellationToken);
}
}
Createfails whenREADME.mdalready exists.Updatereads the file's current SHA from the requested branch, then replaces its contents.Upsertupdates the file when present and creates it only when GitHub reports it missing.
Each successful call creates a commit. The supplied content replaces the entire file; it is not merged with the existing Markdown. The branch must already exist.
| 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.Task (>= 4.0.128)
- Soenneker.GitHub.ClientUtil (>= 4.0.630)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.GitHub.Repositories.Readmes:
| Package | Downloads |
|---|---|
|
Soenneker.GitHub.Repositories.Suite
Registers commonly used Soenneker GitHub repository services through one package |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1029 | 27 | 9/1/2026 |
| 4.0.1028 | 34 | 9/1/2026 |
| 4.0.1027 | 39 | 9/1/2026 |
| 4.0.1026 | 53 | 8/31/2026 |
| 4.0.1025 | 72 | 8/31/2026 |
| 4.0.1024 | 61 | 8/31/2026 |
| 4.0.1023 | 111 | 8/31/2026 |
| 4.0.1022 | 73 | 8/31/2026 |
| 4.0.1021 | 69 | 8/31/2026 |
| 4.0.1020 | 117 | 8/30/2026 |
| 4.0.1019 | 74 | 8/30/2026 |
| 4.0.1018 | 118 | 8/30/2026 |
| 4.0.1017 | 84 | 8/30/2026 |
| 4.0.1016 | 70 | 8/30/2026 |
| 4.0.1015 | 133 | 8/29/2026 |
| 4.0.1014 | 99 | 8/29/2026 |
| 4.0.1013 | 125 | 8/28/2026 |
| 4.0.1012 | 125 | 8/27/2026 |
| 4.0.1011 | 122 | 8/26/2026 |
| 4.0.1010 | 145 | 8/26/2026 |
Updated NuGet packages