diff --git a/GitHub.Octokit.sln b/GitHub.Octokit.sln index 2ce22ca2..bf40df08 100644 --- a/GitHub.Octokit.sln +++ b/GitHub.Octokit.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octokit.NET.SDK", "src\Octokit.NET.SDK.csproj", "{C118D1F2-D47D-4488-9D2F-88BA4A7729BD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Octokit.SDK", "src\GitHub.Octokit.SDK.csproj", "{C118D1F2-D47D-4488-9D2F-88BA4A7729BD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{15BC8D73-8583-4A91-9355-970404126E9B}" ProjectSection(SolutionItems) = preProject diff --git a/README.md b/README.md index 311e2c66..f4088f85 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,16 @@ An "alpha" version of a generated .NET SDK in C# from [GitHub's OpenAPI spec](ht To install the package, you can use either of the following options: -- In Visual Studio, from the Package Explorer, search for `Octokit.NET.SDK`, or -- Type `Install-Package Octokit.NET.SDK` into the Package Manager Console, or -- Type `dotnet add ./path/to/myproject.csproj package Octokit.NET.SDK` in a terminal (replace `./path/to/myproject.csproj` by the path to the _*.csproj_ file you want to add the dependency) +- In Visual Studio, from the Package Explorer, search for `GitHub.Octokit.SDK`, or +- Type `Install-Package GitHub.Octokit.SDK` into the Package Manager Console, or +- Type `dotnet add ./path/to/myproject.csproj package GitHub.Octokit.SDK` in a terminal (replace `./path/to/myproject.csproj` by the path to the _*.csproj_ file you want to add the dependency) ### Make your first request ```csharp using GitHub; -using GitHub.Client; -using GitHub.Authentication; +using GitHub.Octokit.Client; +using GitHub.Octokit.Authentication; var token = Environment.GetEnvironmentVariable("GITHUB_TOKEN") ?? ""; var request = RequestAdapter.Create(new TokenAuthenticationProvider("Octokit.Gen", token)); diff --git a/Tests/Client/ClientFactoryTest.cs b/Tests/Client/ClientFactoryTest.cs index 25718abc..80498751 100644 --- a/Tests/Client/ClientFactoryTest.cs +++ b/Tests/Client/ClientFactoryTest.cs @@ -1,5 +1,5 @@ using Xunit; -using GitHub.Client; +using GitHub.Octokit.Client; public class ClientFactoryTests { diff --git a/Tests/Client/RequestAdaptorTest.cs b/Tests/Client/RequestAdaptorTest.cs index 921b4f53..8dd37690 100644 --- a/Tests/Client/RequestAdaptorTest.cs +++ b/Tests/Client/RequestAdaptorTest.cs @@ -1,6 +1,6 @@ using Xunit; -using GitHub.Client; -using GitHub.Authentication; +using GitHub.Octokit.Client; +using GitHub.Octokit.Authentication; using NSubstitute; public class RequestAdapterTests diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 6de87575..52967d46 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -38,6 +38,6 @@ - + diff --git a/src/Authentication/TokenAuthenticationProvider.cs b/src/Authentication/TokenAuthenticationProvider.cs index f238683f..87b2a41f 100644 --- a/src/Authentication/TokenAuthenticationProvider.cs +++ b/src/Authentication/TokenAuthenticationProvider.cs @@ -1,9 +1,9 @@ -// Copyright (c) GitHub 2023 — Licensed as MIT. +// Copyright (c) GitHub 2023 - Licensed as MIT. using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Authentication; -namespace GitHub.Authentication; +namespace GitHub.Octokit.Authentication; // TODO: Consider implementing `Basic` authentication scheme as a separate class // TODO: Consider implementing `Anonymous` authentication scheme as a separate class diff --git a/src/Client/ClientFactory.cs b/src/Client/ClientFactory.cs index 08b18444..e0039485 100644 --- a/src/Client/ClientFactory.cs +++ b/src/Client/ClientFactory.cs @@ -1,9 +1,9 @@ -// Copyright (c) GitHub 2023 � Licensed as MIT. +// Copyright (c) GitHub 2023 - Licensed as MIT. using System.Net; -using GitHub.Client.Middleware; +using GitHub.Octokit.Client.Middleware; -namespace GitHub.Client; +namespace GitHub.Octokit.Client; /// /// Represents a client factory for creating . diff --git a/src/Client/RequestAdapter.cs b/src/Client/RequestAdapter.cs index f398d060..4d7bfd97 100644 --- a/src/Client/RequestAdapter.cs +++ b/src/Client/RequestAdapter.cs @@ -1,9 +1,9 @@ -// Copyright (c) GitHub 2023 � Licensed as MIT. +// Copyright (c) GitHub 2023 - Licensed as MIT. using Microsoft.Kiota.Abstractions.Authentication; using Microsoft.Kiota.Http.HttpClientLibrary; -namespace GitHub.Client; +namespace GitHub.Octokit.Client; public static class RequestAdapter { diff --git a/src/Octokit.NET.SDK.csproj b/src/GitHub.Octokit.SDK.csproj similarity index 95% rename from src/Octokit.NET.SDK.csproj rename to src/GitHub.Octokit.SDK.csproj index deb9b7e9..fa3b51dc 100644 --- a/src/Octokit.NET.SDK.csproj +++ b/src/GitHub.Octokit.SDK.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - Octokit.NET.SDK + GitHub.Octokit.SDK 0.0.1-alpha 0.0.1-alpha Octokit diff --git a/src/Middleware/APIVersionHandler.cs b/src/Middleware/APIVersionHandler.cs index 334094db..c602a472 100644 --- a/src/Middleware/APIVersionHandler.cs +++ b/src/Middleware/APIVersionHandler.cs @@ -1,9 +1,9 @@ -// Copyright (c) GitHub 2023 — Licensed as MIT. +// Copyright (c) GitHub 2023 - Licensed as MIT. -using GitHub.Client.Middleware.Options; +using GitHub.Octokit.Client.Middleware.Options; using Microsoft.Kiota.Http.HttpClientLibrary.Extensions; -namespace GitHub.Client.Middleware; +namespace GitHub.Octokit.Client.Middleware; /// /// Represents a handler that adds the API version header to outgoing HTTP requests. diff --git a/src/Middleware/Options/APIVersionOptions.cs b/src/Middleware/Options/APIVersionOptions.cs index 30b649d4..e83e85c7 100644 --- a/src/Middleware/Options/APIVersionOptions.cs +++ b/src/Middleware/Options/APIVersionOptions.cs @@ -1,8 +1,8 @@ -// Copyright (c) GitHub 2023 — Licensed as MIT. +// Copyright (c) GitHub 2023 - Licensed as MIT. using Microsoft.Kiota.Abstractions; -namespace GitHub.Client.Middleware.Options; +namespace GitHub.Octokit.Client.Middleware.Options; /// /// Represents the API version options for the middleware. diff --git a/src/Middleware/Options/UserAgentOptions.cs b/src/Middleware/Options/UserAgentOptions.cs index 9b2b428f..0f5e09b4 100644 --- a/src/Middleware/Options/UserAgentOptions.cs +++ b/src/Middleware/Options/UserAgentOptions.cs @@ -1,8 +1,8 @@ -// Copyright (c) GitHub 2023 — Licensed as MIT. +// Copyright (c) GitHub 2023 - Licensed as MIT. using Microsoft.Kiota.Abstractions; -namespace GitHub.Client.Middleware.Options; +namespace GitHub.Octokit.Client.Middleware.Options; /// /// Represents the user agent options for the middleware. diff --git a/src/Middleware/UserAgentHandler.cs b/src/Middleware/UserAgentHandler.cs index 5f44cfd4..360dd5ca 100644 --- a/src/Middleware/UserAgentHandler.cs +++ b/src/Middleware/UserAgentHandler.cs @@ -1,10 +1,10 @@ -// Copyright (c) GitHub 2023 — Licensed as MIT. +// Copyright (c) GitHub 2023 - Licensed as MIT. using System.Net.Http.Headers; -using GitHub.Client.Middleware.Options; +using GitHub.Octokit.Client.Middleware.Options; using Microsoft.Kiota.Http.HttpClientLibrary.Extensions; -namespace GitHub.Client.Middleware; +namespace GitHub.Octokit.Client.Middleware; public class UserAgentHandler(UserAgentOptions? userAgentHandlerOption = null) : DelegatingHandler {