From cfaa8d901ea78a638a6848761a24d3c082ab4573 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 13 Dec 2023 10:20:26 -0600 Subject: [PATCH 1/2] Update README.md - Add `csharp` language identifier to code snippet - Use correct GitHub MD syntax for alerts - Consistent MD formatting --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f0a8f47ca..49b8090ff 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,28 @@ -# dotnet-sdk +# Octokit: .NET SDK An "alpha" version of a generated .NET SDK in C# from [GitHub's OpenAPI spec](https://github.com/github/rest-api-description), built on [Kiota](https://github.com/microsoft/kiota). ## How do I use it? -``` +```csharp using GitHub.Client; using GitHub.Authentication; var token = Environment.GetEnvironmentVariable("GITHUB_TOKEN") ?? ""; -var request = RequestAdapter.Create(new TokenAuthenticationProvider("Octokit.Gen",token)); -var gitHubClient = new Client(request); +var request = RequestAdapter.Create(new TokenAuthenticationProvider("Octokit.Gen", token)); +var gitHubClient = new GitHubClient(request); var pullRequests = await gitHubClient.Repos["octokit"]["octokit.net"].Pulls.GetAsync(); ``` -⚠️ **Note**: This SDK is not yet stable. Breaking changes may occur at any time. +> [!IMPORTANT] +> This SDK is not yet stable. Breaking changes may occur at any time. ## Why a generated SDK? We want to... 1. provide 100% coverage of the API in our SDK -2. use this as a building block for future SDK tooling. +1. use this as a building block for future SDK tooling ## Why .NET? @@ -42,7 +43,7 @@ Currently this project is fairly simple (we hope it can stay that way). All of ## More details on this SDK and repo -* [Code of conduct](Docs/CODE_OF_CONDUCT.md) -* [Contributing](Docs/CONTRIBUTING.md) -* [Releases](Docs/RELEASES.md) -* [Incidents and security](Docs/SECURITY.md) +- [Code of conduct](Docs/CODE_OF_CONDUCT.md) +- [Contributing](Docs/CONTRIBUTING.md) +- [Releases](Docs/RELEASES.md) +- [Incidents and security](Docs/SECURITY.md) From c266cf71773fe2d9ffbec289e96018411b6e08a4 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 13 Dec 2023 10:28:54 -0600 Subject: [PATCH 2/2] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 49b8090ff..07dc21b86 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Octokit: .NET SDK +[![Build and test .NET SDK](https://github.com/octokit/dotnet-sdk/actions/workflows/build.yml/badge.svg)](https://github.com/octokit/dotnet-sdk/actions/workflows/build.yml) [![CodeQL](https://github.com/octokit/dotnet-sdk/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/octokit/dotnet-sdk/actions/workflows/github-code-scanning/codeql) [![Publish Release to NuGet](https://github.com/octokit/dotnet-sdk/actions/workflows/publish.yml/badge.svg)](https://github.com/octokit/dotnet-sdk/actions/workflows/publish.yml) + An "alpha" version of a generated .NET SDK in C# from [GitHub's OpenAPI spec](https://github.com/github/rest-api-description), built on [Kiota](https://github.com/microsoft/kiota). ## How do I use it?