diff --git a/Octokit.Reactive/Clients/ObservableMigrationsClient.cs b/Octokit.Reactive/Clients/ObservableMigrationsClient.cs index fc247b09..86f9c747 100644 --- a/Octokit.Reactive/Clients/ObservableMigrationsClient.cs +++ b/Octokit.Reactive/Clients/ObservableMigrationsClient.cs @@ -37,7 +37,7 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/migration/migrations/#start-a-migration /// /// The organization for which to start a migration. - /// Sprcifies parameters for the migration in a + /// Specifies parameters for the migration in a /// object. /// The started migration. public IObservable Start(string org, StartMigrationRequest migration) diff --git a/Octokit.Tests/Clients/AuthorizationsClientTests.cs b/Octokit.Tests/Clients/AuthorizationsClientTests.cs index 392ec0a4..f9fe5941 100644 --- a/Octokit.Tests/Clients/AuthorizationsClientTests.cs +++ b/Octokit.Tests/Clients/AuthorizationsClientTests.cs @@ -11,7 +11,7 @@ using Xunit; namespace Octokit.Tests.Clients { /// - /// Client tests mostly just need to make sure they call the IApiConnection with the correct + /// Client tests mostly just need to make sure they call the IApiConnection with the correct /// relative Uri. No need to fake up the response. All *those* tests are in ApiConnectionTests.cs. /// public class AuthorizationsClientTests @@ -293,7 +293,8 @@ namespace Octokit.Tests.Clients client.Received().Post( Arg.Is(u => u.ToString() == "applications/clientId/token"), - Arg.Is(o => o.GetType().GetProperty("access_token").GetValue(o).ToString() == "accessToken")); + Arg.Is(o => o.GetType().GetProperty("access_token").GetValue(o).ToString() == "accessToken"), + "application/vnd.github.doctor-strange-preview+json"); } [Fact] @@ -321,7 +322,8 @@ namespace Octokit.Tests.Clients client.Received().Patch( Arg.Is(u => u.ToString() == "applications/clientId/token"), - Arg.Is(o => o.GetType().GetProperty("access_token").GetValue(o).ToString() == "accessToken")); + Arg.Is(o => o.GetType().GetProperty("access_token").GetValue(o).ToString() == "accessToken"), + "application/vnd.github.doctor-strange-preview+json"); } [Fact] @@ -349,7 +351,8 @@ namespace Octokit.Tests.Clients client.Received().Delete( Arg.Is(u => u.ToString() == "applications/clientId/token"), - Arg.Is(o => o.GetType().GetProperty("access_token").GetValue(o).ToString() == "accessToken")); + Arg.Is(o => o.GetType().GetProperty("access_token").GetValue(o).ToString() == "accessToken"), + "application/vnd.github.doctor-strange-preview+json"); } [Fact] diff --git a/Octokit.Tests/Clients/CommitCommentReactionsClientTests.cs b/Octokit.Tests/Clients/CommitCommentReactionsClientTests.cs index fe9dc39b..fd66b02a 100644 --- a/Octokit.Tests/Clients/CommitCommentReactionsClientTests.cs +++ b/Octokit.Tests/Clients/CommitCommentReactionsClientTests.cs @@ -27,7 +27,7 @@ namespace Octokit.Tests.Clients await client.GetAll("fake", "repo", 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -45,7 +45,7 @@ namespace Octokit.Tests.Clients await client.GetAll("fake", "repo", 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -56,7 +56,7 @@ namespace Octokit.Tests.Clients await client.GetAll(1, 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -74,7 +74,7 @@ namespace Octokit.Tests.Clients await client.GetAll(1, 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -113,7 +113,7 @@ namespace Octokit.Tests.Clients client.Create("fake", "repo", 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -126,7 +126,7 @@ namespace Octokit.Tests.Clients client.Create(1, 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] diff --git a/Octokit.Tests/Clients/DeploymentsClientTests.cs b/Octokit.Tests/Clients/DeploymentsClientTests.cs index fdd87729..46057437 100644 --- a/Octokit.Tests/Clients/DeploymentsClientTests.cs +++ b/Octokit.Tests/Clients/DeploymentsClientTests.cs @@ -133,7 +133,7 @@ public class DeploymentsClientTests connection.Received(1) .GetAll(Arg.Is(u => u.ToString() == expectedUrl), Arg.Any>(), - Arg.Is(s => s == AcceptHeaders.DeploymentApiPreview), + "application/vnd.github.ant-man-preview+json", Args.ApiOptions); } } @@ -212,7 +212,7 @@ public class DeploymentsClientTests connection.Received(1).Post(Arg.Any(), Arg.Any(), - Arg.Is(s => s == AcceptHeaders.DeploymentApiPreview)); + "application/vnd.github.ant-man-preview+json"); } } @@ -231,4 +231,4 @@ public class DeploymentsClientTests Assert.NotNull(client.Status); } } -} \ No newline at end of file +} diff --git a/Octokit.Tests/Clients/IssueCommentReactionsClientTests.cs b/Octokit.Tests/Clients/IssueCommentReactionsClientTests.cs index ed64332c..d5c17d38 100644 --- a/Octokit.Tests/Clients/IssueCommentReactionsClientTests.cs +++ b/Octokit.Tests/Clients/IssueCommentReactionsClientTests.cs @@ -26,7 +26,7 @@ namespace Octokit.Tests.Clients await client.GetAll("fake", "repo", 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -44,7 +44,7 @@ namespace Octokit.Tests.Clients await client.GetAll("fake", "repo", 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -55,7 +55,7 @@ namespace Octokit.Tests.Clients await client.GetAll(1, 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -73,7 +73,7 @@ namespace Octokit.Tests.Clients await client.GetAll(1, 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -112,7 +112,7 @@ namespace Octokit.Tests.Clients client.Create("fake", "repo", 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -125,7 +125,7 @@ namespace Octokit.Tests.Clients client.Create(1, 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] diff --git a/Octokit.Tests/Clients/IssueCommentsClientTests.cs b/Octokit.Tests/Clients/IssueCommentsClientTests.cs index 884b22f1..e83a82ad 100644 --- a/Octokit.Tests/Clients/IssueCommentsClientTests.cs +++ b/Octokit.Tests/Clients/IssueCommentsClientTests.cs @@ -23,7 +23,7 @@ namespace Octokit.Tests.Clients connection.Received().Get( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments/42"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -36,7 +36,7 @@ namespace Octokit.Tests.Clients connection.Received().Get(Arg.Is(u => u.ToString() == "repositories/1/issues/comments/42"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -65,7 +65,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -79,7 +79,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -101,7 +101,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } @@ -122,7 +122,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } @@ -162,7 +162,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/3/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -176,7 +176,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/3/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -196,7 +196,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/3/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -215,7 +215,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/3/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -237,7 +237,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/3/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } @@ -258,7 +258,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/3/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } diff --git a/Octokit.Tests/Clients/IssueReactionsClientTests.cs b/Octokit.Tests/Clients/IssueReactionsClientTests.cs index cbe9e390..8d478707 100644 --- a/Octokit.Tests/Clients/IssueReactionsClientTests.cs +++ b/Octokit.Tests/Clients/IssueReactionsClientTests.cs @@ -26,7 +26,7 @@ namespace Octokit.Tests.Clients await client.GetAll("fake", "repo", 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -44,7 +44,7 @@ namespace Octokit.Tests.Clients await client.GetAll("fake", "repo", 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -55,7 +55,7 @@ namespace Octokit.Tests.Clients await client.GetAll(1, 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -73,7 +73,7 @@ namespace Octokit.Tests.Clients await client.GetAll(1, 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -112,7 +112,7 @@ namespace Octokit.Tests.Clients client.Create("fake", "repo", 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -125,7 +125,7 @@ namespace Octokit.Tests.Clients client.Create(1, 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/issues/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/issues/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] diff --git a/Octokit.Tests/Clients/IssueTimelineClientTests.cs b/Octokit.Tests/Clients/IssueTimelineClientTests.cs index d041406a..083f7fcd 100644 --- a/Octokit.Tests/Clients/IssueTimelineClientTests.cs +++ b/Octokit.Tests/Clients/IssueTimelineClientTests.cs @@ -31,7 +31,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/timeline"), Arg.Any>(), - "application/vnd.github.mockingbird-preview,application/vnd.github.starfox-preview", + "application/vnd.github.mockingbird-preview+json,application/vnd.github.starfox-preview+json", Arg.Any()); } @@ -46,7 +46,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/timeline"), Arg.Any>(), - "application/vnd.github.mockingbird-preview,application/vnd.github.starfox-preview", + "application/vnd.github.mockingbird-preview+json,application/vnd.github.starfox-preview+json", Arg.Is(ao => ao.PageSize == 30)); } @@ -61,7 +61,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repositories/1/issues/42/timeline"), Arg.Any>(), - "application/vnd.github.mockingbird-preview,application/vnd.github.starfox-preview", + "application/vnd.github.mockingbird-preview+json,application/vnd.github.starfox-preview+json", Arg.Any()); } @@ -76,7 +76,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "repositories/1/issues/42/timeline"), Arg.Any>(), - "application/vnd.github.mockingbird-preview,application/vnd.github.starfox-preview", + "application/vnd.github.mockingbird-preview+json,application/vnd.github.starfox-preview+json", Arg.Is(ao => ao.PageSize == 30)); } diff --git a/Octokit.Tests/Clients/IssuesClientTests.cs b/Octokit.Tests/Clients/IssuesClientTests.cs index 99b40239..71659e82 100644 --- a/Octokit.Tests/Clients/IssuesClientTests.cs +++ b/Octokit.Tests/Clients/IssuesClientTests.cs @@ -22,7 +22,7 @@ namespace Octokit.Tests.Clients connection.Received().Get(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -35,7 +35,7 @@ namespace Octokit.Tests.Clients connection.Received().Get(Arg.Is(u => u.ToString() == "repositories/1/issues/42"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -74,7 +74,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "issues"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -92,7 +92,7 @@ namespace Octokit.Tests.Clients && d["sort"] == "created" && d["state"] == "open" && d["direction"] == "asc"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } } @@ -120,7 +120,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "user/issues"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } } @@ -162,7 +162,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "orgs/fake/issues"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -183,7 +183,7 @@ namespace Octokit.Tests.Clients && d["direction"] == "asc" && d["sort"] == "created" && d["filter"] == "assigned"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } } @@ -236,7 +236,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -250,7 +250,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -271,7 +271,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } @@ -292,7 +292,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } @@ -313,7 +313,7 @@ namespace Octokit.Tests.Clients && d["direction"] == "asc" && d["sort"] == "created" && d["filter"] == "assigned"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -334,7 +334,7 @@ namespace Octokit.Tests.Clients && d["direction"] == "asc" && d["sort"] == "created" && d["filter"] == "assigned"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -362,7 +362,7 @@ namespace Octokit.Tests.Clients && d["direction"] == "asc" && d["sort"] == "created" && d["filter"] == "assigned"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } @@ -390,7 +390,7 @@ namespace Octokit.Tests.Clients && d["direction"] == "asc" && d["sort"] == "created" && d["filter"] == "assigned"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } } diff --git a/Octokit.Tests/Clients/IssuesEventsClientTests.cs b/Octokit.Tests/Clients/IssuesEventsClientTests.cs index 54e99985..6ad2ccc8 100644 --- a/Octokit.Tests/Clients/IssuesEventsClientTests.cs +++ b/Octokit.Tests/Clients/IssuesEventsClientTests.cs @@ -26,7 +26,7 @@ namespace Octokit.Tests.Clients var client = new IssuesEventsClient(connection); await client.GetAllForIssue("fake", "repo", 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/events"), null, "application/vnd.github.starfox-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/events"), null, "application/vnd.github.starfox-preview+json", Args.ApiOptions); } [Fact] @@ -37,7 +37,7 @@ namespace Octokit.Tests.Clients await client.GetAllForIssue(1, 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/events"), null, "application/vnd.github.starfox-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/events"), null, "application/vnd.github.starfox-preview+json", Args.ApiOptions); } [Fact] @@ -55,7 +55,7 @@ namespace Octokit.Tests.Clients await client.GetAllForIssue("fake", "repo", 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/events"), null, "application/vnd.github.starfox-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/events"), null, "application/vnd.github.starfox-preview+json", options); } [Fact] @@ -73,7 +73,7 @@ namespace Octokit.Tests.Clients await client.GetAllForIssue(1, 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/events"), null, "application/vnd.github.starfox-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/events"), null, "application/vnd.github.starfox-preview+json", options); } [Fact] @@ -106,7 +106,7 @@ namespace Octokit.Tests.Clients await client.GetAllForRepository("fake", "repo"); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/events"), null, "application/vnd.github.starfox-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/events"), null, "application/vnd.github.starfox-preview+json", Args.ApiOptions); } [Fact] @@ -117,7 +117,7 @@ namespace Octokit.Tests.Clients await client.GetAllForRepository(1); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/events"), null, "application/vnd.github.starfox-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/events"), null, "application/vnd.github.starfox-preview+json", Args.ApiOptions); } [Fact] @@ -135,7 +135,7 @@ namespace Octokit.Tests.Clients await client.GetAllForRepository("fake", "repo", options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/events"), null, "application/vnd.github.starfox-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/events"), null, "application/vnd.github.starfox-preview+json", options); } [Fact] @@ -153,7 +153,7 @@ namespace Octokit.Tests.Clients await client.GetAllForRepository(1, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/events"), null, "application/vnd.github.starfox-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/events"), null, "application/vnd.github.starfox-preview+json", options); } [Fact] @@ -186,7 +186,7 @@ namespace Octokit.Tests.Clients client.Get("fake", "repo", 42); - connection.Received().Get(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/events/42"), null, "application/vnd.github.starfox-preview"); + connection.Received().Get(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/events/42"), null, "application/vnd.github.starfox-preview+json"); } [Fact] @@ -197,7 +197,7 @@ namespace Octokit.Tests.Clients client.Get(1, 42); - connection.Received().Get(Arg.Is(u => u.ToString() == "repositories/1/issues/events/42"), null, "application/vnd.github.starfox-preview"); + connection.Received().Get(Arg.Is(u => u.ToString() == "repositories/1/issues/events/42"), null, "application/vnd.github.starfox-preview+json"); } [Fact] @@ -213,4 +213,4 @@ namespace Octokit.Tests.Clients } } } -} \ No newline at end of file +} diff --git a/Octokit.Tests/Clients/MigrationsClientTests.cs b/Octokit.Tests/Clients/MigrationsClientTests.cs index 5dac3601..55566598 100644 --- a/Octokit.Tests/Clients/MigrationsClientTests.cs +++ b/Octokit.Tests/Clients/MigrationsClientTests.cs @@ -31,7 +31,7 @@ namespace Octokit.Tests.Clients connection.Received().Get( Arg.Is(u => u.ToString() == "orgs/fake/migrations/69"), null, - AcceptHeaders.MigrationsApiPreview); + "application/vnd.github.wyandotte-preview+json"); } [Fact] @@ -58,7 +58,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "orgs/fake/migrations"), null, - AcceptHeaders.MigrationsApiPreview, + "application/vnd.github.wyandotte-preview+json", Args.ApiOptions); } @@ -79,7 +79,7 @@ namespace Octokit.Tests.Clients connection.Received().GetAll( Arg.Is(u => u.ToString() == "orgs/fake/migrations"), null, - AcceptHeaders.MigrationsApiPreview, + "application/vnd.github.wyandotte-preview+json", options); } @@ -109,7 +109,7 @@ namespace Octokit.Tests.Clients connection.Received().Post( Arg.Is(u => u.ToString() == "orgs/fake/migrations"), Arg.Any(), - AcceptHeaders.MigrationsApiPreview); + "application/vnd.github.wyandotte-preview+json"); } [Fact] @@ -142,7 +142,7 @@ namespace Octokit.Tests.Clients m.Repositories.Equals(migrationRequest.Repositories) && m.LockRepositories == migrationRequest.LockRepositories && m.ExcludeAttachments == migrationRequest.ExcludeAttachments), - AcceptHeaders.MigrationsApiPreview); + "application/vnd.github.wyandotte-preview+json"); } } @@ -159,7 +159,7 @@ namespace Octokit.Tests.Clients connection.Connection.Received().Get( Arg.Is(u => u.ToString() == "orgs/fake/migrations/69/archive"), null, - AcceptHeaders.MigrationsApiPreview); + "application/vnd.github.wyandotte-preview+json"); } [Fact] @@ -186,7 +186,7 @@ namespace Octokit.Tests.Clients connection.Received().Delete( Arg.Is(u => u.ToString() == "orgs/fake/migrations/69/archive"), Arg.Any(), - AcceptHeaders.MigrationsApiPreview); + "application/vnd.github.wyandotte-preview+json"); } [Fact] @@ -213,7 +213,7 @@ namespace Octokit.Tests.Clients connection.Received().Delete( Arg.Is(u => u.ToString() == "orgs/fake/migrations/69/repos/repo/lock"), Arg.Any(), - AcceptHeaders.MigrationsApiPreview); + "application/vnd.github.wyandotte-preview+json"); } [Fact] diff --git a/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs b/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs index d0eb73c3..099f7aa9 100644 --- a/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs +++ b/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs @@ -26,7 +26,7 @@ namespace Octokit.Tests.Clients await client.GetAll("fake", "repo", 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -43,7 +43,7 @@ namespace Octokit.Tests.Clients await client.GetAll("fake", "repo", 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -54,7 +54,7 @@ namespace Octokit.Tests.Clients await client.GetAll(1, 42); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/pulls/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/pulls/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -71,7 +71,7 @@ namespace Octokit.Tests.Clients await client.GetAll(1, 42, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/pulls/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/pulls/comments/42/reactions"), null, "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -110,7 +110,7 @@ namespace Octokit.Tests.Clients client.Create("fake", "repo", 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -123,7 +123,7 @@ namespace Octokit.Tests.Clients client.Create(1, 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/pulls/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/pulls/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] diff --git a/Octokit.Tests/Clients/PullRequestReviewCommentsClientTests.cs b/Octokit.Tests/Clients/PullRequestReviewCommentsClientTests.cs index a63a1bed..9b9c57b5 100644 --- a/Octokit.Tests/Clients/PullRequestReviewCommentsClientTests.cs +++ b/Octokit.Tests/Clients/PullRequestReviewCommentsClientTests.cs @@ -100,7 +100,7 @@ public class PullRequestReviewCommentsClientTests connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/owner/name/pulls/7/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -133,7 +133,7 @@ public class PullRequestReviewCommentsClientTests connection.Received().GetAll( Arg.Is(u => u.ToString() == "repos/owner/name/pulls/7/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", options); + "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -200,7 +200,7 @@ public class PullRequestReviewCommentsClientTests && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" && d["sort"] == "updated"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -224,7 +224,7 @@ public class PullRequestReviewCommentsClientTests && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" && d["sort"] == "updated"), - "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -254,7 +254,7 @@ public class PullRequestReviewCommentsClientTests && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" && d["sort"] == "updated"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } @@ -285,7 +285,7 @@ public class PullRequestReviewCommentsClientTests && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" && d["sort"] == "updated"), - "application/vnd.github.squirrel-girl-preview", options); + "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -300,7 +300,7 @@ public class PullRequestReviewCommentsClientTests Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" && d["sort"] == "created"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -316,7 +316,7 @@ public class PullRequestReviewCommentsClientTests Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" && d["sort"] == "created"), - "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -338,7 +338,7 @@ public class PullRequestReviewCommentsClientTests Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" && d["sort"] == "created"), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", options); } @@ -361,7 +361,7 @@ public class PullRequestReviewCommentsClientTests Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" && d["sort"] == "created"), - "application/vnd.github.squirrel-girl-preview", options); + "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -421,7 +421,7 @@ public class PullRequestReviewCommentsClientTests connection.Received().Get( Arg.Is(u => u.ToString() == "repos/owner/name/pulls/comments/53"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] diff --git a/Octokit.Tests/Clients/ReactionsClientTests.cs b/Octokit.Tests/Clients/ReactionsClientTests.cs index ddc6d72a..681a077b 100644 --- a/Octokit.Tests/Clients/ReactionsClientTests.cs +++ b/Octokit.Tests/Clients/ReactionsClientTests.cs @@ -26,7 +26,7 @@ namespace Octokit.Tests.Clients await client.Delete(42); - connection.Received().Delete(Arg.Is(u => u.ToString() == "reactions/42"), Arg.Any(), "application/vnd.github.squirrel-girl-preview"); + connection.Received().Delete(Arg.Is(u => u.ToString() == "reactions/42"), Arg.Any(), "application/vnd.github.squirrel-girl-preview+json"); } } } diff --git a/Octokit.Tests/Clients/RepositoryCommentsClientTests.cs b/Octokit.Tests/Clients/RepositoryCommentsClientTests.cs index d255289d..afa8fcb8 100644 --- a/Octokit.Tests/Clients/RepositoryCommentsClientTests.cs +++ b/Octokit.Tests/Clients/RepositoryCommentsClientTests.cs @@ -20,7 +20,7 @@ public class RepositoryCommentsClientTests await client.Get("fake", "repo", 42); - connection.Received().Get(Arg.Is(u => u.ToString() == "repos/fake/repo/comments/42"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview"); + connection.Received().Get(Arg.Is(u => u.ToString() == "repos/fake/repo/comments/42"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -31,7 +31,7 @@ public class RepositoryCommentsClientTests await client.Get(1, 42); - connection.Received().Get(Arg.Is(u => u.ToString() == "repositories/1/comments/42"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview"); + connection.Received().Get(Arg.Is(u => u.ToString() == "repositories/1/comments/42"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -57,7 +57,7 @@ public class RepositoryCommentsClientTests await client.GetAllForRepository("fake", "repo"); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/comments"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/comments"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -68,7 +68,7 @@ public class RepositoryCommentsClientTests await client.GetAllForRepository(1); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/comments"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview", Args.ApiOptions); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/comments"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } [Fact] @@ -86,7 +86,7 @@ public class RepositoryCommentsClientTests await client.GetAllForRepository("fake", "repo", options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/comments"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/comments"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -104,7 +104,7 @@ public class RepositoryCommentsClientTests await client.GetAllForRepository(1, options); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/comments"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview", options); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/comments"), Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -141,7 +141,7 @@ public class RepositoryCommentsClientTests connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/commits/sha/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -155,7 +155,7 @@ public class RepositoryCommentsClientTests connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/commits/sha/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", + "application/vnd.github.squirrel-girl-preview+json", Args.ApiOptions); } @@ -175,7 +175,7 @@ public class RepositoryCommentsClientTests await client.GetAllForCommit("fake", "repo", "sha", options); connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/commits/sha/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", options); + "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] @@ -195,7 +195,7 @@ public class RepositoryCommentsClientTests connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/commits/sha/comments"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview", options); + "application/vnd.github.squirrel-girl-preview+json", options); } [Fact] diff --git a/Octokit.Tests/Reactive/ObservableIssueCommentsClientTests.cs b/Octokit.Tests/Reactive/ObservableIssueCommentsClientTests.cs index d5057064..d7d4b6e6 100644 --- a/Octokit.Tests/Reactive/ObservableIssueCommentsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableIssueCommentsClientTests.cs @@ -59,7 +59,7 @@ namespace Octokit.Tests.Reactive gitHubClient.Connection.Received(1).Get>( new Uri("repos/fake/repo/issues/comments", UriKind.Relative), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -73,7 +73,7 @@ namespace Octokit.Tests.Reactive gitHubClient.Connection.Received(1).Get>( new Uri("repositories/1/issues/comments", UriKind.Relative), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -103,7 +103,7 @@ namespace Octokit.Tests.Reactive && d["direction"] == "desc" && d["since"] == "2016-11-23T11:11:11Z" && d["sort"] == "updated"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -133,7 +133,7 @@ namespace Octokit.Tests.Reactive && d["direction"] == "desc" && d["since"] == "2016-11-23T11:11:11Z" && d["sort"] == "updated"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -172,7 +172,7 @@ namespace Octokit.Tests.Reactive gitHubClient.Connection.Received(1).Get>( new Uri("repos/fake/repo/issues/3/comments", UriKind.Relative), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -184,7 +184,7 @@ namespace Octokit.Tests.Reactive client.GetAllForIssue(1, 3); gitHubClient.Connection.Received(1).Get>( - new Uri("repositories/1/issues/3/comments", UriKind.Relative), Arg.Any>(), "application/vnd.github.squirrel-girl-preview"); + new Uri("repositories/1/issues/3/comments", UriKind.Relative), Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -204,7 +204,7 @@ namespace Octokit.Tests.Reactive new Uri("repos/fake/repo/issues/3/comments", UriKind.Relative), Arg.Is>(d => d.Count == 3 && d["since"] == "2016-11-23T11:11:11Z"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -224,7 +224,7 @@ namespace Octokit.Tests.Reactive new Uri("repositories/1/issues/3/comments", UriKind.Relative), Arg.Is>(d => d.Count == 3 && d["since"] == "2016-11-23T11:11:11Z"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -245,7 +245,7 @@ namespace Octokit.Tests.Reactive gitHubClient.Connection.Received(1).Get>( new Uri("repos/fake/repo/issues/3/comments", UriKind.Relative), Arg.Is>(d => d.Count == 4), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -266,7 +266,7 @@ namespace Octokit.Tests.Reactive gitHubClient.Connection.Received(1).Get>( new Uri("repositories/1/issues/3/comments", UriKind.Relative), Arg.Is>(d => d.Count == 4), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] diff --git a/Octokit.Tests/Reactive/ObservableIssueTimelineClientTests.cs b/Octokit.Tests/Reactive/ObservableIssueTimelineClientTests.cs index dcc02ca2..836d9638 100644 --- a/Octokit.Tests/Reactive/ObservableIssueTimelineClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableIssueTimelineClientTests.cs @@ -37,7 +37,7 @@ namespace Octokit.Tests.Reactive { ApiInfo = new ApiInfo(new Dictionary(), new List(), new List(), "etag", new RateLimit()), }, result); - gitHubClient.Connection.Get>(Args.Uri, Args.EmptyDictionary, "application/vnd.github.mockingbird-preview") + gitHubClient.Connection.Get>(Args.Uri, Args.EmptyDictionary, "application/vnd.github.mockingbird-preview+json") .Returns(Task.FromResult(response)); var timelineEvents = await client.GetAllForIssue("fake", "repo", 42).ToList(); @@ -45,7 +45,7 @@ namespace Octokit.Tests.Reactive connection.Received().Get>( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/timeline"), Arg.Any>(), - "application/vnd.github.mockingbird-preview"); + "application/vnd.github.mockingbird-preview+json"); Assert.Equal(1, timelineEvents.Count); } @@ -63,7 +63,7 @@ namespace Octokit.Tests.Reactive { ApiInfo = new ApiInfo(new Dictionary(), new List(), new List(), "etag", new RateLimit()), }, result); - gitHubClient.Connection.Get>(Args.Uri, Arg.Is>(d => d.Count == 1), "application/vnd.github.mockingbird-preview") + gitHubClient.Connection.Get>(Args.Uri, Arg.Is>(d => d.Count == 1), "application/vnd.github.mockingbird-preview+json") .Returns(Task.FromResult(response)); var timelineEvents = await client.GetAllForIssue("fake", "repo", 42, new ApiOptions { PageSize = 30 }).ToList(); @@ -71,7 +71,7 @@ namespace Octokit.Tests.Reactive connection.Received().Get>( Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/timeline"), Arg.Is>(d => d.Count == 1 && d["per_page"] == "30"), - "application/vnd.github.mockingbird-preview"); + "application/vnd.github.mockingbird-preview+json"); Assert.Equal(1, timelineEvents.Count); } @@ -88,7 +88,7 @@ namespace Octokit.Tests.Reactive { ApiInfo = new ApiInfo(new Dictionary(), new List(), new List(), "etag", new RateLimit()), }, result); - githubClient.Connection.Get>(Args.Uri, Args.EmptyDictionary, "application/vnd.github.mockingbird-preview") + githubClient.Connection.Get>(Args.Uri, Args.EmptyDictionary, "application/vnd.github.mockingbird-preview+json") .Returns(Task.FromResult(response)); var timelineEvents = await client.GetAllForIssue(1, 42).ToList(); @@ -96,7 +96,7 @@ namespace Octokit.Tests.Reactive connection.Received().Get>( Arg.Is(u => u.ToString() == "repositories/1/issues/42/timeline"), Arg.Any>(), - "application/vnd.github.mockingbird-preview"); + "application/vnd.github.mockingbird-preview+json"); Assert.Equal(1, timelineEvents.Count); } @@ -113,7 +113,7 @@ namespace Octokit.Tests.Reactive { ApiInfo = new ApiInfo(new Dictionary(), new List(), new List(), "etag", new RateLimit()), }, result); - githubClient.Connection.Get>(Args.Uri, Arg.Is>(d => d.Count == 1), "application/vnd.github.mockingbird-preview") + githubClient.Connection.Get>(Args.Uri, Arg.Is>(d => d.Count == 1), "application/vnd.github.mockingbird-preview+json") .Returns(Task.FromResult(response)); var timelineEvents = await client.GetAllForIssue(1, 42, new ApiOptions { PageSize = 30 }).ToList(); @@ -121,7 +121,7 @@ namespace Octokit.Tests.Reactive connection.Received().Get>( Arg.Is(u => u.ToString() == "repositories/1/issues/42/timeline"), Arg.Is>(d => d.Count == 1 && d["per_page"] == "30"), - "application/vnd.github.mockingbird-preview"); + "application/vnd.github.mockingbird-preview+json"); Assert.Equal(1, timelineEvents.Count); } diff --git a/Octokit.Tests/Reactive/ObservableIssuesClientTests.cs b/Octokit.Tests/Reactive/ObservableIssuesClientTests.cs index 5577d5a8..dd5ec4b2 100644 --- a/Octokit.Tests/Reactive/ObservableIssuesClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableIssuesClientTests.cs @@ -95,7 +95,7 @@ public class ObservableIssuesClientTests gitHubClient.Connection.Received().Get>(Arg.Is(u => u.ToString() == "repos/fake/repo/issues"), Arg.Any>(), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -133,7 +133,7 @@ public class ObservableIssuesClientTests && d["direction"] == "desc" && d["page"] == "1" && d["per_page"] == "1"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -178,7 +178,7 @@ public class ObservableIssuesClientTests && d["state"] == "open" && d["sort"] == "created" && d["direction"] == "asc"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -226,7 +226,7 @@ public class ObservableIssuesClientTests && d["direction"] == "asc" && d["page"] == "1" && d["per_page"] == "1"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -302,9 +302,9 @@ public class ObservableIssuesClientTests && d["sort"] == "created" && d["filter"] == "assigned"), Arg.Any()) .Returns(Task.Factory.StartNew>>(() => firstPageResponse)); - gitHubClient.Connection.Get>(secondPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview") + gitHubClient.Connection.Get>(secondPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => secondPageResponse)); - gitHubClient.Connection.Get>(thirdPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview") + gitHubClient.Connection.Get>(thirdPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => lastPageResponse)); var client = new ObservableIssuesClient(gitHubClient); @@ -377,11 +377,11 @@ public class ObservableIssuesClientTests && d["state"] == "open" && d["sort"] == "created" && d["filter"] == "assigned"), - "application/vnd.github.squirrel-girl-preview") + "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => firstPageResponse)); - gitHubClient.Connection.Get>(secondPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview") + gitHubClient.Connection.Get>(secondPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => secondPageResponse)); - gitHubClient.Connection.Get>(thirdPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview") + gitHubClient.Connection.Get>(thirdPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => lastPageResponse)); var client = new ObservableIssuesClient(gitHubClient); @@ -463,11 +463,11 @@ public class ObservableIssuesClientTests && d["direction"] == "desc" && d["state"] == "open" && d["sort"] == "created" - && d["filter"] == "assigned"), "application/vnd.github.squirrel-girl-preview") + && d["filter"] == "assigned"), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => firstPageResponse)); - gitHubClient.Connection.Get>(secondPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview") + gitHubClient.Connection.Get>(secondPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => secondPageResponse)); - gitHubClient.Connection.Get>(thirdPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview") + gitHubClient.Connection.Get>(thirdPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => lastPageResponse)); var client = new ObservableIssuesClient(gitHubClient); @@ -536,11 +536,11 @@ public class ObservableIssuesClientTests && d["direction"] == "desc" && d["state"] == "open" && d["sort"] == "created" - && d["filter"] == "assigned"), "application/vnd.github.squirrel-girl-preview") + && d["filter"] == "assigned"), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => firstPageResponse)); - gitHubClient.Connection.Get>(secondPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview") + gitHubClient.Connection.Get>(secondPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => secondPageResponse)); - gitHubClient.Connection.Get>(thirdPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview") + gitHubClient.Connection.Get>(thirdPageUrl, Arg.Any>(), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => lastPageResponse)); var client = new ObservableIssuesClient(gitHubClient); diff --git a/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs b/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs index 9266da83..600714f4 100644 --- a/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs @@ -125,7 +125,7 @@ namespace Octokit.Tests.Reactive ); var gitHubClient = Substitute.For(); - var acceptHeader = "application/vnd.github.squirrel-girl-preview"; + var acceptHeader = "application/vnd.github.squirrel-girl-preview+json"; gitHubClient.Connection.Get>(firstPageUrl, Args.EmptyDictionary, acceptHeader) .Returns(Task.Factory.StartNew>>(() => firstPageResponse)); gitHubClient.Connection.Get>(secondPageUrl, Args.EmptyDictionary, acceptHeader) @@ -344,7 +344,7 @@ namespace Octokit.Tests.Reactive ); var gitHubClient = Substitute.For(); - var previewAcceptHeader = "application/vnd.github.squirrel-girl-preview"; + var previewAcceptHeader = "application/vnd.github.squirrel-girl-preview+json"; gitHubClient.Connection.Get>(firstPageUrl, Arg.Is>(d => d.Count == 3 @@ -433,17 +433,17 @@ namespace Octokit.Tests.Reactive Arg.Is>(d => d.Count == 3 && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" - && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview") + && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => firstPageResponse)); gitHubClient.Connection.Get>(secondPageUrl, Arg.Is>(d => d.Count == 3 && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" - && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview") + && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => secondPageResponse)); gitHubClient.Connection.Get>(thirdPageUrl, Arg.Is>(d => d.Count == 3 && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" - && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview") + && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => lastPageResponse)); var client = new ObservablePullRequestReviewCommentsClient(gitHubClient); @@ -462,15 +462,15 @@ namespace Octokit.Tests.Reactive Arg.Is>(d => d.Count == 3 && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" - && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview"); + && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview+json"); gitHubClient.Connection.Received(1).Get>(secondPageUrl, Arg.Is>(d => d.Count == 3 && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" - && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview"); + && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview+json"); gitHubClient.Connection.Received(1).Get>(thirdPageUrl, Arg.Is>(d => d.Count == 3 && d["direction"] == "desc" && d["since"] == "2013-11-15T11:43:01Z" - && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview"); + && d["sort"] == "updated"), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -570,7 +570,7 @@ namespace Octokit.Tests.Reactive var gitHubClient = Substitute.For(); - var previewAcceptHeader = "application/vnd.github.squirrel-girl-preview"; + var previewAcceptHeader = "application/vnd.github.squirrel-girl-preview+json"; gitHubClient.Connection.Get>(firstPageUrl, Arg.Is>(d => d.Count == 2 @@ -645,15 +645,15 @@ namespace Octokit.Tests.Reactive gitHubClient.Connection.Get>(firstPageUrl, Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" - && d["sort"] == "created"), "application/vnd.github.squirrel-girl-preview") + && d["sort"] == "created"), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => firstPageResponse)); gitHubClient.Connection.Get>(secondPageUrl, Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" - && d["sort"] == "created"), "application/vnd.github.squirrel-girl-preview") + && d["sort"] == "created"), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => secondPageResponse)); gitHubClient.Connection.Get>(thirdPageUrl, Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" - && d["sort"] == "created"), "application/vnd.github.squirrel-girl-preview") + && d["sort"] == "created"), "application/vnd.github.squirrel-girl-preview+json") .Returns(Task.Factory.StartNew>>(() => lastPageResponse)); var client = new ObservablePullRequestReviewCommentsClient(gitHubClient); @@ -665,14 +665,14 @@ namespace Octokit.Tests.Reactive Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" && d["sort"] == "created"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); gitHubClient.Connection.Received(1).Get>(secondPageUrl, Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" && d["sort"] == "created"), - "application/vnd.github.squirrel-girl-preview"); + "application/vnd.github.squirrel-girl-preview+json"); gitHubClient.Connection.Received(1).Get>(thirdPageUrl, Arg.Is>(d => d.Count == 2 && d["direction"] == "asc" - && d["sort"] == "created"), "application/vnd.github.squirrel-girl-preview"); + && d["sort"] == "created"), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] diff --git a/Octokit.Tests/Reactive/ObservableRepositoryCommentsClientTests.cs b/Octokit.Tests/Reactive/ObservableRepositoryCommentsClientTests.cs index 85d60cc0..8945a9d1 100644 --- a/Octokit.Tests/Reactive/ObservableRepositoryCommentsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableRepositoryCommentsClientTests.cs @@ -66,7 +66,7 @@ namespace Octokit.Tests.Reactive client.GetAllForRepository("fake", "repo"); githubClient.Connection.Received(1).Get>(Arg.Is(uri => uri.ToString() == "repos/fake/repo/comments"), - Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview"); + Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -77,7 +77,7 @@ namespace Octokit.Tests.Reactive client.GetAllForRepository(1); githubClient.Connection.Received(1).Get>(Arg.Is(uri => uri.ToString() == "repositories/1/comments"), - Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview"); + Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -95,7 +95,7 @@ namespace Octokit.Tests.Reactive client.GetAllForRepository("fake", "repo", options); githubClient.Connection.Received(1).Get>(Arg.Is(uri => uri.ToString() == "repos/fake/repo/comments"), - Arg.Is>(dictionary => dictionary.Count == 2), "application/vnd.github.squirrel-girl-preview"); + Arg.Is>(dictionary => dictionary.Count == 2), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -113,7 +113,7 @@ namespace Octokit.Tests.Reactive client.GetAllForRepository(1, options); githubClient.Connection.Received(1).Get>(Arg.Is(uri => uri.ToString() == "repositories/1/comments"), - Arg.Is>(dictionary => dictionary.Count == 2), "application/vnd.github.squirrel-girl-preview"); + Arg.Is>(dictionary => dictionary.Count == 2), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -147,7 +147,7 @@ namespace Octokit.Tests.Reactive client.GetAllForCommit("fake", "repo", "sha"); githubClient.Connection.Received().Get>(Arg.Is(new Uri("repos/fake/repo/commits/sha/comments", UriKind.Relative)), - Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview"); + Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -158,7 +158,7 @@ namespace Octokit.Tests.Reactive client.GetAllForCommit(1, "sha"); githubClient.Connection.Received().Get>(Arg.Is(new Uri("repositories/1/commits/sha/comments", UriKind.Relative)), - Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview"); + Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -176,7 +176,7 @@ namespace Octokit.Tests.Reactive client.GetAllForCommit("fake", "repo", "sha", options); githubClient.Connection.Received().Get>(Arg.Is(new Uri("repos/fake/repo/commits/sha/comments", UriKind.Relative)), - Arg.Is>(d => d.Count == 2), "application/vnd.github.squirrel-girl-preview"); + Arg.Is>(d => d.Count == 2), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] @@ -194,7 +194,7 @@ namespace Octokit.Tests.Reactive client.GetAllForCommit(1, "sha", options); githubClient.Connection.Received().Get>(Arg.Is(new Uri("repositories/1/commits/sha/comments", UriKind.Relative)), - Arg.Is>(d => d.Count == 2), "application/vnd.github.squirrel-girl-preview"); + Arg.Is>(d => d.Count == 2), "application/vnd.github.squirrel-girl-preview+json"); } [Fact] diff --git a/Octokit/Clients/AuthorizationsClient.cs b/Octokit/Clients/AuthorizationsClient.cs index 0c25517d..82523839 100644 --- a/Octokit/Clients/AuthorizationsClient.cs +++ b/Octokit/Clients/AuthorizationsClient.cs @@ -357,7 +357,7 @@ namespace Octokit }; var endpoint = ApiUrls.ApplicationAuthorization(clientId); - return ApiConnection.Post(endpoint, requestData); + return ApiConnection.Post(endpoint, requestData, AcceptHeaders.OAuthApplicationsPreview); } /// @@ -382,7 +382,7 @@ namespace Octokit }; var endpoint = ApiUrls.ApplicationAuthorization(clientId); - return ApiConnection.Patch(endpoint, requestData); + return ApiConnection.Patch(endpoint, requestData, AcceptHeaders.OAuthApplicationsPreview); } /// @@ -407,7 +407,7 @@ namespace Octokit }; var endpoint = ApiUrls.ApplicationAuthorization(clientId); - return ApiConnection.Delete(endpoint, requestData); + return ApiConnection.Delete(endpoint, requestData, AcceptHeaders.OAuthApplicationsPreview); } /// diff --git a/Octokit/Clients/CheckRunsClient.cs b/Octokit/Clients/CheckRunsClient.cs index f65f5f57..6e4791f1 100644 --- a/Octokit/Clients/CheckRunsClient.cs +++ b/Octokit/Clients/CheckRunsClient.cs @@ -30,6 +30,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// Details of the Check Run to create + [Preview("antiope")] [ManualRoute("POST", "/repos/{owner}/{name}/check-runs")] public Task Create(string owner, string name, NewCheckRun newCheckRun) { @@ -48,6 +49,7 @@ namespace Octokit /// /// The Id of the repository /// Details of the Check Run to create + [Preview("antiope")] [ManualRoute("POST", "/repositories/{id}/check-runs")] public Task Create(long repositoryId, NewCheckRun newCheckRun) { @@ -66,6 +68,7 @@ namespace Octokit /// The name of the repository /// The Id of the check run /// The updates to the check run + [Preview("antiope")] [ManualRoute("PATCH", "/repos/{owner}/{name}/check-runs/{check_run_id}")] public Task Update(string owner, string name, long checkRunId, CheckRunUpdate checkRunUpdate) { @@ -85,6 +88,7 @@ namespace Octokit /// The Id of the repository /// The Id of the check run /// The updates to the check run + [Preview("antiope")] [ManualRoute("PATCH", "/repositories/{id}/check-runs/{check_run_id}")] public Task Update(long repositoryId, long checkRunId, CheckRunUpdate checkRunUpdate) { @@ -178,6 +182,7 @@ namespace Octokit /// The commit reference (can be a SHA, branch name, or a tag name) /// Details to filter the request, such as by check name /// Options to change the API response + [Preview("antiope")] [ManualRoute("GET", "repos/{owner}/{name}/commits/{sha}/check-runs")] public async Task GetAllForReference(string owner, string name, string reference, CheckRunRequest checkRunRequest, ApiOptions options) { @@ -204,6 +209,7 @@ namespace Octokit /// The commit reference (can be a SHA, branch name, or a tag name) /// Details to filter the request, such as by check name /// Options to change the API response + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/commits/{sha}/check-runs")] public async Task GetAllForReference(long repositoryId, string reference, CheckRunRequest checkRunRequest, ApiOptions options) { @@ -298,6 +304,7 @@ namespace Octokit /// The Id of the check suite /// Details to filter the request, such as by check name /// Options to change the API response + [Preview("antiope")] [ManualRoute("GET", "/repos/{owner}/{name}/check-suite/{check_suite_id}/check-runs")] public async Task GetAllForCheckSuite(string owner, string name, long checkSuiteId, CheckRunRequest checkRunRequest, ApiOptions options) { @@ -323,6 +330,7 @@ namespace Octokit /// The Id of the check suite /// Details to filter the request, such as by check name /// Options to change the API response + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/check-suites/{check_suite_id}/check-runs")] public async Task GetAllForCheckSuite(long repositoryId, long checkSuiteId, CheckRunRequest checkRunRequest, ApiOptions options) { @@ -345,6 +353,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The Id of the check run + [Preview("antiope")] [ManualRoute("GET", "/repos/{owner}/{name}/check-runs/{check_run_id}")] public Task Get(string owner, string name, long checkRunId) { @@ -362,6 +371,7 @@ namespace Octokit /// /// The Id of the repository /// The Id of the check run + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/check-runs/{check_run_id}")] public Task Get(long repositoryId, long checkRunId) { @@ -411,6 +421,7 @@ namespace Octokit /// The name of the repository /// The Id of the check run /// Options to change the API response + [Preview("antiope")] [ManualRoute("GET", "/repos/{owner}/{name}/check-runs/{check_run_id}/annotations")] public Task> GetAllAnnotations(string owner, string name, long checkRunId, ApiOptions options) { @@ -430,6 +441,7 @@ namespace Octokit /// The Id of the repository /// The Id of the check run /// Options to change the API response + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/check-runs/{check_run_id}/annotations")] public Task> GetAllAnnotations(long repositoryId, long checkRunId, ApiOptions options) { diff --git a/Octokit/Clients/CheckSuitesClient.cs b/Octokit/Clients/CheckSuitesClient.cs index b912e593..5213f0b6 100644 --- a/Octokit/Clients/CheckSuitesClient.cs +++ b/Octokit/Clients/CheckSuitesClient.cs @@ -30,6 +30,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The Id of the check suite + [Preview("antiope")] [ManualRoute("GET", "/repos/{owner}/{name}/check-suites/{id}")] public Task Get(string owner, string name, long checkSuiteId) { @@ -47,6 +48,7 @@ namespace Octokit /// /// The Id of the repository /// The Id of the check suite + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/check-suites/{check_suite_id}")] public Task Get(long repositoryId, long checkSuiteId) { @@ -138,6 +140,7 @@ namespace Octokit /// The reference (SHA, branch name or tag name) to list check suites for /// Details to filter the request, such as by App Id or Check Name /// Options to change the API response + [Preview("antiope")] [ManualRoute("GET", "/repos/{owner}/{name}/commits/{ref}/check-suites")] public async Task GetAllForReference(string owner, string name, string reference, CheckSuiteRequest request, ApiOptions options) { @@ -164,6 +167,7 @@ namespace Octokit /// The reference (SHA, branch name or tag name) to list check suites for /// Details to filter the request, such as by App Id or Check Name /// Options to change the API response + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/commits/{ref}/check-suites")] public async Task GetAllForReference(long repositoryId, string reference, CheckSuiteRequest request, ApiOptions options) { @@ -187,6 +191,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The check suite preferences + [Preview("antiope")] [ManualRoute("PATCH", "/repos/{owner}/{name}/check-suites/preferences")] public Task UpdatePreferences(string owner, string name, CheckSuitePreferences preferences) { @@ -205,6 +210,7 @@ namespace Octokit /// /// The Id of the repository /// The check suite preferences + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/check-suites/preferences")] public Task UpdatePreferences(long repositoryId, CheckSuitePreferences preferences) { @@ -222,6 +228,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// Details of the Check Suite to create + [Preview("antiope")] [ManualRoute("POST", "/repos/{owner}/{name}/check-suites")] public Task Create(string owner, string name, NewCheckSuite newCheckSuite) { @@ -240,6 +247,7 @@ namespace Octokit /// /// The Id of the repository /// Details of the Check Suite to create + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/check-suites")] public Task Create(long repositoryId, NewCheckSuite newCheckSuite) { @@ -257,6 +265,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The Id of the check suite + [Preview("antiope")] [ManualRoute("GET", "/repos/{owner}/{name}/check-suites/{2}/rerequest")] public async Task Rerequest(string owner, string name, long checkSuiteId) { @@ -281,6 +290,7 @@ namespace Octokit /// /// The Id of the repository /// The Id of the check suite + [Preview("antiope")] [ManualRoute("GET", "/repositories/{id}/check-suites/{2}/rerequest")] public async Task Rerequest(long repositoryId, long checkSuiteId) { diff --git a/Octokit/Clients/CommitCommentReactionsClient.cs b/Octokit/Clients/CommitCommentReactionsClient.cs index f9b1520c..f7f5f69b 100644 --- a/Octokit/Clients/CommitCommentReactionsClient.cs +++ b/Octokit/Clients/CommitCommentReactionsClient.cs @@ -25,6 +25,7 @@ namespace Octokit /// The comment id /// The reaction to create /// + [Preview("squirrel-girl")] [ManualRoute("POST", "/repos/{owner}/{name}/comments/{comment_id}/reactions")] public Task Create(string owner, string name, int number, NewReaction reaction) { @@ -43,6 +44,7 @@ namespace Octokit /// The comment id /// The reaction to create /// + [Preview("squirrel-girl")] [ManualRoute("POST", "/repositories/{id}/comments/{comment_id}/reactions")] public Task Create(long repositoryId, int number, NewReaction reaction) { @@ -57,7 +59,7 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// [ManualRoute("GET", "/repos/{owner}/{name}/comments/{comment_id}/reactions")] public Task> GetAll(string owner, string name, int number) @@ -74,6 +76,7 @@ namespace Octokit /// The comment id /// Options for changing the API response /// + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/comments/{comment_id}/reactions")] public Task> GetAll(string owner, string name, int number, ApiOptions options) { @@ -89,7 +92,7 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// [ManualRoute("GET", "/repositories/{id}/comments/{comment_id}/reactions")] public Task> GetAll(long repositoryId, int number) @@ -105,6 +108,7 @@ namespace Octokit /// The comment id /// Options for changing the API response /// + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/comments/{comment_id}/reactions")] public Task> GetAll(long repositoryId, int number, ApiOptions options) { diff --git a/Octokit/Clients/DeploymentStatusClient.cs b/Octokit/Clients/DeploymentStatusClient.cs index c328a04b..679febf2 100644 --- a/Octokit/Clients/DeploymentStatusClient.cs +++ b/Octokit/Clients/DeploymentStatusClient.cs @@ -62,6 +62,8 @@ namespace Octokit /// The name of the repository. /// The id of the deployment. /// Options for changing the API response + [Preview("ant-man")] + [Preview("flash")] [ManualRoute("GET", "/repos/{owner}/{name}/deployments/{deployment_id}/statuses")] public Task> GetAll(string owner, string name, int deploymentId, ApiOptions options) { @@ -85,6 +87,8 @@ namespace Octokit /// The Id of the repository. /// The id of the deployment. /// Options for changing the API response + [Preview("ant-man")] + [Preview("flash")] [ManualRoute("GET", "/repositories/{id}/deployments/{deployment_id}/statuses")] public Task> GetAll(long repositoryId, int deploymentId, ApiOptions options) { @@ -107,6 +111,8 @@ namespace Octokit /// The name of the repository. /// The id of the deployment. /// The new deployment status to create. + [Preview("ant-man")] + [Preview("flash")] [ManualRoute("POST", "/repos/{owner}/{name}/deployments/{deployment_id}/statuses")] public Task Create(string owner, string name, int deploymentId, NewDeploymentStatus newDeploymentStatus) { @@ -129,6 +135,8 @@ namespace Octokit /// The Id of the repository. /// The id of the deployment. /// The new deployment status to create. + [Preview("ant-man")] + [Preview("flash")] [ManualRoute("POST", "/repositories/{id}/deployments/{deployment_id}/statuses")] public Task Create(long repositoryId, int deploymentId, NewDeploymentStatus newDeploymentStatus) { diff --git a/Octokit/Clients/DeploymentsClient.cs b/Octokit/Clients/DeploymentsClient.cs index f3020fae..4ef62344 100644 --- a/Octokit/Clients/DeploymentsClient.cs +++ b/Octokit/Clients/DeploymentsClient.cs @@ -64,6 +64,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// Options for changing the API response + [Preview("ant-man")] [ManualRoute("GET", "/repos/{owner}/{name}/deployments")] public Task> GetAll(string owner, string name, ApiOptions options) { @@ -104,6 +105,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// A instance describing the new deployment to create + [Preview("ant-man")] [ManualRoute("POST", "/repos/{owner}/{name}/deployments")] public Task Create(string owner, string name, NewDeployment newDeployment) { diff --git a/Octokit/Clients/GitHubAppInstallationsClient.cs b/Octokit/Clients/GitHubAppInstallationsClient.cs index ed6c015c..7bba1e47 100644 --- a/Octokit/Clients/GitHubAppInstallationsClient.cs +++ b/Octokit/Clients/GitHubAppInstallationsClient.cs @@ -30,6 +30,7 @@ namespace Octokit /// /// Options for changing the API response /// https://developer.github.com/v3/apps/installations/#list-repositories + [Preview("machine-man")] [ManualRoute("GET", "/installation/repositories")] public async Task GetAllRepositoriesForCurrent(ApiOptions options) { @@ -59,6 +60,7 @@ namespace Octokit /// The Id of the installation /// Options for changing the API response /// https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation + [Preview("machine-man")] [ManualRoute("GET", "/user/installation/{id}/repositories")] public async Task GetAllRepositoriesForCurrentUser(long installationId, ApiOptions options) { diff --git a/Octokit/Clients/GitHubAppsClient.cs b/Octokit/Clients/GitHubAppsClient.cs index b04dd007..32fa47aa 100644 --- a/Octokit/Clients/GitHubAppsClient.cs +++ b/Octokit/Clients/GitHubAppsClient.cs @@ -33,6 +33,7 @@ namespace Octokit /// /// https://developer.github.com/v3/apps/#get-a-single-github-app /// The URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App. + [Preview("machine-man")] [ManualRoute("GET", "/apps/{slug}")] public Task Get(string slug) { @@ -45,6 +46,7 @@ namespace Octokit /// Returns the GitHub App associated with the authentication credentials used (requires GitHubApp auth). /// /// https://developer.github.com/v3/apps/#get-the-authenticated-github-app + [Preview("machine-man")] [ManualRoute("GET", "/app")] public Task GetCurrent() { @@ -66,6 +68,7 @@ namespace Octokit /// /// Options for changing the API response /// https://developer.github.com/v3/apps/#find-installations + [Preview("machine-man")] [ManualRoute("GET", "/app/installations")] public Task> GetAllInstallationsForCurrent(ApiOptions options) { @@ -90,6 +93,7 @@ namespace Octokit /// /// https://developer.github.com/v3/apps/#get-a-single-installation /// The Id of the GitHub App Installation + [Preview("machine-man")] [ManualRoute("GET", "/app/installations/{id}")] public Task GetInstallationForCurrent(long installationId) { @@ -100,6 +104,7 @@ namespace Octokit /// List installations for the currently authenticated user (requires GitHubApp User-To-Server Auth). /// /// https://developer.github.com/v3/apps/#list-installations-for-user + [Preview("machine-man")] [ManualRoute("GET", "/user/installations")] public async Task GetAllInstallationsForCurrentUser() { @@ -114,6 +119,7 @@ namespace Octokit /// List installations for the currently authenticated user (requires GitHubApp User-To-Server Auth). /// /// https://developer.github.com/v3/apps/#list-installations-for-user + [Preview("machine-man")] [ManualRoute("GET", "/user/installations")] public async Task GetAllInstallationsForCurrentUser(ApiOptions options) { @@ -135,6 +141,7 @@ namespace Octokit /// https://developer.github.com/v3/apps/available-endpoints/ /// /// The Id of the GitHub App Installation + [Preview("machine-man")] [ManualRoute("GET", "/app/installations/{id}/access_tokens")] public Task CreateInstallationToken(long installationId) { @@ -146,6 +153,7 @@ namespace Octokit /// /// https://developer.github.com/v3/apps/#find-organization-installation /// The name of the organization + [Preview("machine-man")] [ManualRoute("GET", "/orgs/{org}/installation")] public Task GetOrganizationInstallationForCurrent(string organization) { @@ -160,6 +168,7 @@ namespace Octokit /// https://developer.github.com/v3/apps/#find-repository-installation /// The owner of the repo /// The name of the repo + [Preview("machine-man")] [ManualRoute("GET", "/repos/{owner}/{name}/installation")] public Task GetRepositoryInstallationForCurrent(string owner, string repo) { @@ -174,6 +183,7 @@ namespace Octokit /// /// https://developer.github.com/v3/apps/#find-repository-installation /// The Id of the repository + [Preview("machine-man")] [ManualRoute("GET", "/repositories/{id}/installation")] public Task GetRepositoryInstallationForCurrent(long repositoryId) { @@ -185,6 +195,7 @@ namespace Octokit /// /// https://developer.github.com/v3/apps/#find-user-installation /// The name of the user + [Preview("machine-man")] [ManualRoute("GET", "/users/{user}/installation")] public Task GetUserInstallationForCurrent(string user) { diff --git a/Octokit/Clients/IssueCommentReactionsClient.cs b/Octokit/Clients/IssueCommentReactionsClient.cs index cdacda60..e8a06142 100644 --- a/Octokit/Clients/IssueCommentReactionsClient.cs +++ b/Octokit/Clients/IssueCommentReactionsClient.cs @@ -24,6 +24,7 @@ namespace Octokit /// The name of the repository /// The comment id /// The reaction to create + [Preview("squirrel-girl")] [ManualRoute("POST", "/repos/{owner}/{name}/issues/comments/{number}/reactions")] public Task Create(string owner, string name, int number, NewReaction reaction) { @@ -41,6 +42,7 @@ namespace Octokit /// The Id of the repository /// The comment id /// The reaction to create + [Preview("squirrel-girl")] [ManualRoute("POST", "/repositories/{0}/issues/comments/{number}/reactions")] public Task Create(long repositoryId, int number, NewReaction reaction) { @@ -70,6 +72,7 @@ namespace Octokit /// The name of the repository /// The comment id /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("POST", "/repos/{owner}/{name}/issues/comments/{number}/reactions")] public Task> GetAll(string owner, string name, int number, ApiOptions options) { @@ -99,6 +102,7 @@ namespace Octokit /// The Id of the repository /// The comment id /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{0}/issues/comments/{number}/reactions")] public Task> GetAll(long repositoryId, int number, ApiOptions options) { diff --git a/Octokit/Clients/IssueCommentsClient.cs b/Octokit/Clients/IssueCommentsClient.cs index eaecae76..e243f582 100644 --- a/Octokit/Clients/IssueCommentsClient.cs +++ b/Octokit/Clients/IssueCommentsClient.cs @@ -26,6 +26,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue comment id + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/comments/{comment_id}")] public Task Get(string owner, string name, int id) { @@ -41,6 +42,7 @@ namespace Octokit /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The Id of the repository /// The issue comment id + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/issues/comments/{comment_id}")] public Task Get(long repositoryId, int id) { @@ -143,6 +145,7 @@ namespace Octokit /// The name of the repository /// The sorting parameters /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/comments")] public Task> GetAllForRepository(string owner, string name, IssueCommentRequest request, ApiOptions options) { @@ -161,6 +164,7 @@ namespace Octokit /// The Id of the repository /// The sorting parameters /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/issues/comments")] public Task> GetAllForRepository(long repositoryId, IssueCommentRequest request, ApiOptions options) { @@ -273,6 +277,7 @@ namespace Octokit /// The issue number /// The sorting parameters /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number]/comments")] public Task> GetAllForIssue(string owner, string name, int number, IssueCommentRequest request, ApiOptions options) { @@ -293,6 +298,7 @@ namespace Octokit /// The sorting parameters /// Options for changing the API response [ManualRoute("GET", "/repositories/{id}/issues/{number}/comments")] + [Preview("squirrel-girl")] public Task> GetAllForIssue(long repositoryId, int number, IssueCommentRequest request, ApiOptions options) { Ensure.ArgumentNotNull(request, nameof(request)); diff --git a/Octokit/Clients/IssueReactionsClient.cs b/Octokit/Clients/IssueReactionsClient.cs index a2763783..05a959c8 100644 --- a/Octokit/Clients/IssueReactionsClient.cs +++ b/Octokit/Clients/IssueReactionsClient.cs @@ -37,6 +37,7 @@ namespace Octokit /// The name of the repository /// The issue id /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/reactions")] public Task> GetAll(string owner, string name, int number, ApiOptions options) { @@ -66,6 +67,7 @@ namespace Octokit /// The Id of the repository /// The issue id /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/issues/{number}/reactions")] public Task> GetAll(long repositoryId, int number, ApiOptions options) { @@ -82,6 +84,7 @@ namespace Octokit /// The name of the repository /// The issue id /// The reaction to create + [Preview("squirrel-girl")] [ManualRoute("POST", "/repos/{owner}/{name}/issues/{number}/reactions")] public Task Create(string owner, string name, int number, NewReaction reaction) { @@ -99,6 +102,7 @@ namespace Octokit /// The Id of the repository /// The issue id /// The reaction to create + [Preview("squirrel-girl")] [ManualRoute("POST", "/repositories/{id}/issues/{number}/reactions")] public Task Create(long repositoryId, int number, NewReaction reaction) { diff --git a/Octokit/Clients/IssueTimelineClient.cs b/Octokit/Clients/IssueTimelineClient.cs index 86e6ef49..20ebc310 100644 --- a/Octokit/Clients/IssueTimelineClient.cs +++ b/Octokit/Clients/IssueTimelineClient.cs @@ -43,6 +43,8 @@ namespace Octokit /// The name of the repository /// The issue number /// Options for changing the API repsonse + [Preview("mockingbird")] + [Preview("starfox")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/timeline")] public Task> GetAllForIssue(string owner, string repo, int number, ApiOptions options) { @@ -79,6 +81,8 @@ namespace Octokit /// The Id of the repository /// The issue number /// Options for changing the API response + [Preview("mockingbird")] + [Preview("starfox")] [ManualRoute("GET", "/repositories/{id}/issues/{number}/timeline")] public Task> GetAllForIssue(long repositoryId, int number, ApiOptions options) { diff --git a/Octokit/Clients/IssuesClient.cs b/Octokit/Clients/IssuesClient.cs index 9ad98b2a..14b38e7c 100644 --- a/Octokit/Clients/IssuesClient.cs +++ b/Octokit/Clients/IssuesClient.cs @@ -66,6 +66,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue number + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}")] public Task Get(string owner, string name, int number) { @@ -83,6 +84,7 @@ namespace Octokit /// /// The Id of the repository /// The issue number + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/issues/{number}")] public Task Get(long repositoryId, int number) { @@ -145,6 +147,7 @@ namespace Octokit /// /// Used to filter and sort the list of issues returned /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/issues")] public Task> GetAllForCurrent(IssueRequest request, ApiOptions options) { @@ -208,6 +211,7 @@ namespace Octokit /// /// Used to filter and sort the list of issues returned /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/user/issues")] public Task> GetAllForOwnedAndMemberRepositories(IssueRequest request, ApiOptions options) { @@ -275,6 +279,7 @@ namespace Octokit /// The name of the organization /// Used to filter and sort the list of issues returned /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/orgs/{org}/issues")] public Task> GetAllForOrganization(string organization, IssueRequest request, ApiOptions options) { @@ -395,6 +400,7 @@ namespace Octokit /// The name of the repository /// Used to filter and sort the list of issues returned /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/issues")] public Task> GetAllForRepository(string owner, string name, RepositoryIssueRequest request, ApiOptions options) { @@ -415,6 +421,7 @@ namespace Octokit /// The Id of the repository /// Used to filter and sort the list of issues returned /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/issues")] public Task> GetAllForRepository(long repositoryId, RepositoryIssueRequest request, ApiOptions options) { diff --git a/Octokit/Clients/IssuesEventsClient.cs b/Octokit/Clients/IssuesEventsClient.cs index d88c685f..8cee21f3 100644 --- a/Octokit/Clients/IssuesEventsClient.cs +++ b/Octokit/Clients/IssuesEventsClient.cs @@ -57,6 +57,7 @@ namespace Octokit /// The name of the repository /// The issue number /// Options for changing the API response + [Preview("starfox")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/events")] public Task> GetAllForIssue(string owner, string name, int number, ApiOptions options) { @@ -79,6 +80,7 @@ namespace Octokit /// The Id of the repository /// The issue number /// Options for changing the API response + [Preview("starfox")] [ManualRoute("GET", "/repositories/{id}/issues/{number}/events")] public Task> GetAllForIssue(long repositoryId, int number, ApiOptions options) { @@ -129,6 +131,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// Options for changing the API response + [Preview("starfox")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/events")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { @@ -150,6 +153,7 @@ namespace Octokit /// /// The Id of the repository /// Options for changing the API response + [Preview("starfox")] [ManualRoute("GET", "/repositories/{id}/issues/events")] public Task> GetAllForRepository(long repositoryId, ApiOptions options) { @@ -170,6 +174,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The event id + [Preview("starfox")] [ManualRoute("GET", "/repos/{owner}/{name}/issues/events/{event_id}")] public Task Get(string owner, string name, long eventId) { @@ -189,6 +194,7 @@ namespace Octokit /// /// The Id of the repository /// The event id + [Preview("starfox")] [ManualRoute("GET", "/repositories/{id}/issues/events/{event_id}")] public Task Get(long repositoryId, long eventId) { diff --git a/Octokit/Clients/MigrationsClient.cs b/Octokit/Clients/MigrationsClient.cs index 35dc505c..efef5ba0 100644 --- a/Octokit/Clients/MigrationsClient.cs +++ b/Octokit/Clients/MigrationsClient.cs @@ -27,9 +27,10 @@ namespace Octokit /// https://developer.github.com/v3/migration/migrations/#start-a-migration /// /// The organization for which to start a migration. - /// Sprcifies parameters for the migration in a + /// Specifies parameters for the migration in a /// object. /// The started migration. + [Preview("wyandotte")] [ManualRoute("POST", "/orgs/{org}/migrations")] public async Task Start(string org, StartMigrationRequest migration) { @@ -65,6 +66,7 @@ namespace Octokit /// Options for changing the API response /// List of most recent s. [ManualRoute("GET", "/orgs/{org}/migrations")] + [Preview("wyandotte")] public async Task> GetAll(string org, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(org, nameof(org)); @@ -84,6 +86,7 @@ namespace Octokit /// The organization which is migrating. /// Migration Id of the organization. /// A object representing the state of migration. + [Preview("wyandotte")] [ManualRoute("GET", "/orgs/{org}/migrations/{id}")] public async Task Get(string org, int id) { @@ -103,6 +106,7 @@ namespace Octokit /// The organization of which the migration was. /// The Id of the migration. /// The binary contents of the archive as a byte array. + [Preview("wyandotte")] [ManualRoute("GET", "/orgs/{org}/migrations/{id}/archive")] public async Task GetArchive(string org, int id) { @@ -123,6 +127,7 @@ namespace Octokit /// The organization of which the migration was. /// The Id of the migration. /// + [Preview("wyandotte")] [ManualRoute("DELETE", "/orgs/{org}/migrations/{id}/archive")] public Task DeleteArchive(string org, int id) { @@ -143,6 +148,7 @@ namespace Octokit /// The Id of the migration. /// The repo to unlock. /// + [Preview("wyandotte")] [ManualRoute("GET", "/orgs/{org}/migrations/{id}/repos/{name}/lock")] public Task UnlockRepository(string org, int id, string repo) { diff --git a/Octokit/Clients/ProjectCardsClient.cs b/Octokit/Clients/ProjectCardsClient.cs index 62581ef9..93556e26 100644 --- a/Octokit/Clients/ProjectCardsClient.cs +++ b/Octokit/Clients/ProjectCardsClient.cs @@ -71,6 +71,7 @@ namespace Octokit /// The id of the column /// Used to filter the list of project cards returned /// Options for changing the API response + [Preview("inertia")] [ManualRoute("GET", "/projects/columns/{column_id}/cards")] public Task> GetAll(int columnId, ProjectCardRequest request, ApiOptions options) { @@ -87,6 +88,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The id of the card + [Preview("inertia")] [ManualRoute("GET", "/projects/columns/cards/{card_id}")] public Task Get(int id) { @@ -101,6 +103,7 @@ namespace Octokit /// /// The id of the column /// The card to create + [Preview("inertia")] [ManualRoute("POST", "/projects/columns/{column_id}/cards")] public Task Create(int columnId, NewProjectCard newProjectCard) { @@ -117,6 +120,7 @@ namespace Octokit /// /// The id of the card /// New values to update the card with + [Preview("inertia")] [ManualRoute("GET", "/projects/columns/cards/{card_id}")] public Task Update(int id, ProjectCardUpdate projectCardUpdate) { @@ -132,6 +136,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The id of the card + [Preview("inertia")] [ManualRoute("DELETE", "/projects/columns/cards/{card_id}")] public async Task Delete(int id) { @@ -156,6 +161,7 @@ namespace Octokit /// /// The id of the card /// The position to move the card + [Preview("inertia")] [ManualRoute("POST", "/projects/columns/cards/{card_id}/moves")] public async Task Move(int id, ProjectCardMove position) { diff --git a/Octokit/Clients/ProjectColumnsClient.cs b/Octokit/Clients/ProjectColumnsClient.cs index 2eb31342..78cde571 100644 --- a/Octokit/Clients/ProjectColumnsClient.cs +++ b/Octokit/Clients/ProjectColumnsClient.cs @@ -38,6 +38,7 @@ namespace Octokit /// /// The Id of the project /// Options for changing the API response + [Preview("inertia")] [ManualRoute("GET", "projects/{project_id}/columns")] public Task> GetAll(int projectId, ApiOptions options) { @@ -53,6 +54,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The id of the column + [Preview("inertia")] [ManualRoute("GET", "projects/columns/{column_id}")] public Task Get(int id) { @@ -67,6 +69,7 @@ namespace Octokit /// /// The Id of the project /// The column to create + [Preview("inertia")] [ManualRoute("POST", "projects/{project_id}/columns")] public Task Create(int projectId, NewProjectColumn newProjectColumn) { @@ -83,6 +86,7 @@ namespace Octokit /// /// The id of the column /// New values to update the column with + [Preview("inertia")] [ManualRoute("PATCH", "projects/columns/{column_id}")] public Task Update(int id, ProjectColumnUpdate projectColumnUpdate) { @@ -98,6 +102,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The id of the column + [Preview("inertia")] [ManualRoute("DELETE", "projects/columns/{column_id}")] public async Task Delete(int id) { @@ -121,6 +126,7 @@ namespace Octokit /// /// The id of the column /// The position to move the column + [Preview("inertia")] [ManualRoute("POST", "projects/columns/{column_id}/moves")] public async Task Move(int id, ProjectColumnMove position) { diff --git a/Octokit/Clients/ProjectsClient.cs b/Octokit/Clients/ProjectsClient.cs index c6651a4a..c93096fd 100644 --- a/Octokit/Clients/ProjectsClient.cs +++ b/Octokit/Clients/ProjectsClient.cs @@ -43,6 +43,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// Options for changing the API response + [Preview("inertia")] [ManualRoute("GET", "/repos/{owner}/{name}/projects")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { @@ -78,6 +79,7 @@ namespace Octokit /// The name of the repository /// Used to filter the list of projects returned /// Options for changing the API response + [Preview("inertia")] [ManualRoute("GET", "/repos/{owner}/{name}/projects")] public Task> GetAllForRepository(string owner, string name, ProjectRequest request, ApiOptions options) { @@ -110,6 +112,7 @@ namespace Octokit /// /// The Id of the repository /// Options for changing the API response + [Preview("inertia")] [ManualRoute("GET", "/repositories/{id}/projects")] public Task> GetAllForRepository(long repositoryId, ApiOptions options) { @@ -141,6 +144,7 @@ namespace Octokit /// The Id of the repository /// Used to filter the list of projects returned /// Options for changing the API response + [Preview("inertia")] [ManualRoute("GET", "/repositories/{id}/projects")] public Task> GetAllForRepository(long repositoryId, ProjectRequest request, ApiOptions options) { @@ -171,6 +175,7 @@ namespace Octokit /// /// The name of the organization /// Options for changing the API response + [Preview("inertia")] [ManualRoute("GET", "/orgs/{org}/projects")] public Task> GetAllForOrganization(string organization, ApiOptions options) { @@ -207,6 +212,7 @@ namespace Octokit /// The name of the organization /// Used to filter the list of projects returned /// Options for changing the API response + [Preview("inertia")] [ManualRoute("GET", "/orgs/{org}/projects")] public Task> GetAllForOrganization(string organization, ProjectRequest request, ApiOptions options) { @@ -224,6 +230,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The Id of the project + [Preview("inertia")] [ManualRoute("GET", "/projects/{project_id}")] public Task Get(int id) { @@ -241,6 +248,7 @@ namespace Octokit /// /// The Id of the repository /// The new project to create for this repository + [Preview("inertia")] [ManualRoute("POST", "/repositories/{id}/projects")] public Task CreateForRepository(long repositoryId, NewProject newProject) { @@ -257,6 +265,7 @@ namespace Octokit /// /// The name of the organization /// The new project to create for this repository + [Preview("inertia")] [ManualRoute("POST", "/orgs/{org}/projects")] public Task CreateForOrganization(string organization, NewProject newProject) { @@ -274,6 +283,7 @@ namespace Octokit /// /// The Id of the project /// The modified project + [Preview("inertia")] [ManualRoute("PATCH", "/project/{project_id}")] public Task Update(int id, ProjectUpdate projectUpdate) { @@ -289,6 +299,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The Id of the project + [Preview("inertia")] [ManualRoute("DELETE", "/project/{project_id}")] public async Task Delete(int id) { diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index a59900ec..60359910 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -37,6 +37,7 @@ namespace Octokit /// The name of the repository /// The comment id /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/pulls/comments/{comment_id}/reactions")] public Task> GetAll(string owner, string name, int number, ApiOptions options) { @@ -66,6 +67,7 @@ namespace Octokit /// The Id of the repository /// The comment id /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/pulls/comments/{comment_id}/reactions")] public Task> GetAll(long repositoryId, int number, ApiOptions options) { @@ -82,6 +84,7 @@ namespace Octokit /// The name of the repository /// The comment id /// The reaction to create + [Preview("squirrel-girl")] [ManualRoute("POST", "/repos/{owner}/{name}/pulls/comments/{comment_id}/reactions")] public Task Create(string owner, string name, int number, NewReaction reaction) { @@ -99,6 +102,7 @@ namespace Octokit /// The Id of the repository /// The comment id /// The reaction to create + [Preview("squirrel-girl")] [ManualRoute("POST", "/repositories/{id}/pulls/comments/{comment_id}/reactions")] public Task Create(long repositoryId, int number, NewReaction reaction) { diff --git a/Octokit/Clients/PullRequestReviewCommentsClient.cs b/Octokit/Clients/PullRequestReviewCommentsClient.cs index 7737d015..a3b6d56f 100644 --- a/Octokit/Clients/PullRequestReviewCommentsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentsClient.cs @@ -54,6 +54,7 @@ namespace Octokit /// The pull request number /// Options for changing the API response [ManualRoute("GET", "/repos/{owner}/{name}/pulls/{number}/comments")] + [Preview("squirrel-girl")] public Task> GetAll(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -174,6 +175,7 @@ namespace Octokit /// The name of the repository /// The sorting parameters /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/pulls/comments")] public Task> GetAllForRepository(string owner, string name, PullRequestReviewCommentRequest request, ApiOptions options) { @@ -192,6 +194,7 @@ namespace Octokit /// The Id of the repository /// The sorting parameters /// Options for changing the API response + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/pulls/comments")] public Task> GetAllForRepository(long repositoryId, PullRequestReviewCommentRequest request, ApiOptions options) { @@ -208,6 +211,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The pull request review comment number + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/pulls/comments/{number}")] public Task GetComment(string owner, string name, int number) { diff --git a/Octokit/Clients/PullRequestsClient.cs b/Octokit/Clients/PullRequestsClient.cs index d54a8011..ecc4bb04 100644 --- a/Octokit/Clients/PullRequestsClient.cs +++ b/Octokit/Clients/PullRequestsClient.cs @@ -41,6 +41,7 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/#get-a-single-pull-request /// + [Preview("shadow-cat")] [ManualRoute("GET", "/repos/{owner}/{name}/pulls/{number}")] public Task Get(string owner, string name, int number) { @@ -56,6 +57,7 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/#get-a-single-pull-request /// + [Preview("shadow-cat")] [ManualRoute("GET", "/repositories/{id}/pulls/{number}")] public Task Get(long repositoryId, int number) { @@ -172,6 +174,7 @@ namespace Octokit /// The name of the repository /// Used to filter and sort the list of pull requests returned /// Options for changing the API response + [Preview("shadow-cat")] [ManualRoute("GET", "/repos/{owner}/{name}/pulls")] public Task> GetAllForRepository(string owner, string name, PullRequestRequest request, ApiOptions options) { @@ -193,6 +196,7 @@ namespace Octokit /// The Id of the repository /// Used to filter and sort the list of pull requests returned /// Options for changing the API response + [Preview("shadow-cat")] [ManualRoute("GET", "/repositories/{id}/pulls")] public Task> GetAllForRepository(long repositoryId, PullRequestRequest request, ApiOptions options) { @@ -210,6 +214,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// A instance describing the new PullRequest to create + [Preview("shadow-cat")] [ManualRoute("POST", "/repos/{owner}/{name}/pulls")] public Task Create(string owner, string name, NewPullRequest newPullRequest) { @@ -226,6 +231,7 @@ namespace Octokit /// http://developer.github.com/v3/pulls/#create-a-pull-request /// The Id of the repository /// A instance describing the new PullRequest to create + [Preview("shadow-cat")] [ManualRoute("POST", "/repositories/{id}/pulls")] public Task Create(long repositoryId, NewPullRequest newPullRequest) { @@ -243,6 +249,7 @@ namespace Octokit /// The PullRequest number /// An instance describing the changes to make to the PullRequest /// + [Preview("shadow-cat")] [ManualRoute("PATCH", "/repos/{owner}/{name}/pulls/{number}")] public Task Update(string owner, string name, int number, PullRequestUpdate pullRequestUpdate) { @@ -261,6 +268,7 @@ namespace Octokit /// The PullRequest number /// An instance describing the changes to make to the PullRequest /// + [Preview("shadow-cat")] [ManualRoute("PATCH", "/repositories/{id}/pulls/{number}")] public Task Update(long repositoryId, int number, PullRequestUpdate pullRequestUpdate) { diff --git a/Octokit/Clients/ReactionsClient.cs b/Octokit/Clients/ReactionsClient.cs index 55be5c2a..69a815e3 100644 --- a/Octokit/Clients/ReactionsClient.cs +++ b/Octokit/Clients/ReactionsClient.cs @@ -53,9 +53,10 @@ namespace Octokit /// /// Delete a reaction. /// - /// https://developer.github.com/v3/reactions/#delete-a-reaction - /// The reaction id + /// https://developer.github.com/v3/reactions/#delete-a-reaction + /// The reaction id /// + [Preview("squirrel-girl")] [ManualRoute("DELETE", "/reactions/{number}")] public Task Delete(int number) { diff --git a/Octokit/Clients/RepositoryBranchesClient.cs b/Octokit/Clients/RepositoryBranchesClient.cs index f4085857..e86211c9 100644 --- a/Octokit/Clients/RepositoryBranchesClient.cs +++ b/Octokit/Clients/RepositoryBranchesClient.cs @@ -64,6 +64,7 @@ namespace Octokit /// The name of the repository /// Options for changing the API response /// Thrown when a general API error occurs. + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches")] public Task> GetAll(string owner, string name, ApiOptions options) { @@ -82,6 +83,7 @@ namespace Octokit /// /// The Id of the repository /// Options for changing the API response + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches")] public Task> GetAll(long repositoryId, ApiOptions options) { @@ -99,6 +101,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}")] public Task Get(string owner, string name, string branch) { @@ -117,6 +120,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}")] public Task Get(long repositoryId, string branch) { @@ -134,6 +138,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}/protection")] public Task GetBranchProtection(string owner, string name, string branch) { @@ -152,6 +157,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection")] public Task GetBranchProtection(long repositoryId, string branch) { @@ -170,6 +176,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// Branch protection settings + [Preview("luke-cage")] [ManualRoute("PUT", "/repos/{owner}/{name}/branches/{branch}/protection")] public Task UpdateBranchProtection(string owner, string name, string branch, BranchProtectionSettingsUpdate update) { @@ -190,6 +197,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// Branch protection settings + [Preview("luke-cage")] [ManualRoute("PUT", "/repositories/{id}/branches/{branch}/protection")] public Task UpdateBranchProtection(long repositoryId, string branch, BranchProtectionSettingsUpdate update) { @@ -208,6 +216,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repos/{owner}/{name}/branches/{branch}/protection")] public async Task DeleteBranchProtection(string owner, string name, string branch) { @@ -235,6 +244,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repositories/{id}/branches/{branch}/protection")] public async Task DeleteBranchProtection(long repositoryId, string branch) { @@ -261,6 +271,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}/protection/required_status_checks")] public Task GetRequiredStatusChecks(string owner, string name, string branch) { @@ -279,6 +290,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection/required_status_checks")] public Task GetRequiredStatusChecks(long repositoryId, string branch) { @@ -297,6 +309,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// Required status checks + [Preview("luke-cage")] [ManualRoute("PATCH", "/repos/{owner}/{name}/branches/{branch}/protection/required_status_checks")] public Task UpdateRequiredStatusChecks(string owner, string name, string branch, BranchProtectionRequiredStatusChecksUpdate update) { @@ -317,6 +330,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// Required status checks + [Preview("luke-cage")] [ManualRoute("PATCH", "/repositories/{id}/branches/{branch}/protection/required_status_checks")] public Task UpdateRequiredStatusChecks(long repositoryId, string branch, BranchProtectionRequiredStatusChecksUpdate update) { @@ -335,6 +349,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repos/{owner}/{name}/branches/{branch}/protection/required_status_checks")] public async Task DeleteRequiredStatusChecks(string owner, string name, string branch) { @@ -363,6 +378,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repositories/{id}/branches/{branch}/protection/required_status_checks")] public async Task DeleteRequiredStatusChecks(long repositoryId, string branch) { @@ -390,6 +406,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}/protection/required_status_checks/contexts")] public Task> GetAllRequiredStatusChecksContexts(string owner, string name, string branch) { @@ -408,6 +425,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection/required_status_checks/contexts")] public Task> GetAllRequiredStatusChecksContexts(long repositoryId, string branch) { @@ -426,6 +444,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// The contexts to replace + [Preview("luke-cage")] [ManualRoute("PUT", "/repos/{owner}/{name}/branches/{branch}/protection/required_status_checks/contexts")] public Task> UpdateRequiredStatusChecksContexts(string owner, string name, string branch, IReadOnlyList contexts) { @@ -446,6 +465,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// The contexts to replace + [Preview("luke-cage")] [ManualRoute("PUT", "/repositories/{id}/branches/{branch}/protection/required_status_checks/contexts")] public Task> UpdateRequiredStatusChecksContexts(long repositoryId, string branch, IReadOnlyList contexts) { @@ -465,6 +485,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// The contexts to add + [Preview("luke-cage")] [ManualRoute("POST", "/repos/{owner}/{name}/branches/{branch}/protection/required_status_checks/contexts")] public Task> AddRequiredStatusChecksContexts(string owner, string name, string branch, IReadOnlyList contexts) { @@ -485,6 +506,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// The contexts to add + [Preview("luke-cage")] [ManualRoute("POST", "/repositories/{id}/branches/{branch}/protection/required_status_checks/contexts")] public Task> AddRequiredStatusChecksContexts(long repositoryId, string branch, IReadOnlyList contexts) { @@ -504,6 +526,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// The contexts to remove + [Preview("luke-cage")] [ManualRoute("DELETE", "/repos/{owner}/{name}/branches/{branch}/protection/required_status_checks/contexts")] public Task> DeleteRequiredStatusChecksContexts(string owner, string name, string branch, IReadOnlyList contexts) { @@ -524,6 +547,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// The contexts to remove + [Preview("luke-cage")] [ManualRoute("DELETE", "/repositories/{id}/branches/{branch}/protection/required_status_checks/contexts")] public Task> DeleteRequiredStatusChecksContexts(long repositoryId, string branch, IReadOnlyList contexts) { @@ -542,6 +566,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}/protection/required_pull_request_reviews")] public Task GetReviewEnforcement(string owner, string name, string branch) { @@ -560,6 +585,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection/required_pull_request_reviews")] public Task GetReviewEnforcement(long repositoryId, string branch) { @@ -578,6 +604,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// The required pull request review settings + [Preview("luke-cage")] [ManualRoute("PATCH", "/repos/{owner}/{name}/branches/{branch}/protection/required_pull_request_reviews")] public Task UpdateReviewEnforcement(string owner, string name, string branch, BranchProtectionRequiredReviewsUpdate update) { @@ -598,6 +625,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// The required pull request review settings + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection/required_pull_request_reviews")] public Task UpdateReviewEnforcement(long repositoryId, string branch, BranchProtectionRequiredReviewsUpdate update) { @@ -616,6 +644,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repos/{owner}/{name}/branches/{branch}/protection/required_pull_request_reviews")] public async Task RemoveReviewEnforcement(string owner, string name, string branch) { @@ -644,6 +673,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repositories/{id}/branches/{branch}/protection/required_pull_request_reviews")] public async Task RemoveReviewEnforcement(long repositoryId, string branch) { @@ -671,6 +701,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}/protection/enforce_admins")] public Task GetAdminEnforcement(string owner, string name, string branch) { @@ -689,6 +720,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection/enforce_admins")] public Task GetAdminEnforcement(long repositoryId, string branch) { @@ -706,6 +738,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("POST", "/repos/{owner}/{name}/branches/{branch}/protection/enforce_admins")] public Task AddAdminEnforcement(string owner, string name, string branch) { @@ -724,6 +757,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("POST", "/repositories/{id}/branches/{branch}/protection/enforce_admins")] public Task AddAdminEnforcement(long repositoryId, string branch) { @@ -741,6 +775,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repos/{owner}/{name}/branches/{branch}/protection/enforce_admins")] public async Task RemoveAdminEnforcement(string owner, string name, string branch) { @@ -769,6 +804,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repositories/{id}/branches/{branch}/protection/enforce_admins")] public async Task RemoveAdminEnforcement(long repositoryId, string branch) { @@ -796,6 +832,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions")] public Task GetProtectedBranchRestrictions(string owner, string name, string branch) { @@ -814,6 +851,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection/restrictions")] public Task GetProtectedBranchRestrictions(long repositoryId, string branch) { @@ -831,6 +869,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions")] public async Task DeleteProtectedBranchRestrictions(string owner, string name, string branch) { @@ -859,6 +898,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("DELETE", "/repositories/{id}/branches/{branch}/protection/restrictions")] public async Task DeleteProtectedBranchRestrictions(long repositoryId, string branch) { @@ -886,6 +926,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions/teams")] public Task> GetAllProtectedBranchTeamRestrictions(string owner, string name, string branch) { @@ -904,6 +945,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection/restrictions/teams")] public Task> GetAllProtectedBranchTeamRestrictions(long repositoryId, string branch) { @@ -922,6 +964,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// List of teams with push access + [Preview("luke-cage")] [ManualRoute("PUT", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions/teams")] public Task> UpdateProtectedBranchTeamRestrictions(string owner, string name, string branch, BranchProtectionTeamCollection teams) { @@ -942,6 +985,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// List of teams with push access + [Preview("luke-cage")] [ManualRoute("PUT", "/repositories/{id}/branches/{branch}/protection/restrictions/teams")] public Task> UpdateProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams) { @@ -961,6 +1005,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// List of teams with push access to add + [Preview("luke-cage")] [ManualRoute("POST", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions/teams")] public Task> AddProtectedBranchTeamRestrictions(string owner, string name, string branch, BranchProtectionTeamCollection teams) { @@ -981,6 +1026,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// List of teams with push access to add + [Preview("luke-cage")] [ManualRoute("POST", "/repositories/{id}/branches/{branch}/protection/restrictions/teams")] public Task> AddProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams) { @@ -1000,6 +1046,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// List of teams to remove + [Preview("luke-cage")] [ManualRoute("DELETE", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions/teams")] public Task> DeleteProtectedBranchTeamRestrictions(string owner, string name, string branch, BranchProtectionTeamCollection teams) { @@ -1020,6 +1067,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// List of teams to remove + [Preview("luke-cage")] [ManualRoute("DELETE", "/repositories/{id}/branches/{branch}/protection/restrictions/teams")] public Task> DeleteProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams) { @@ -1038,6 +1086,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions/users")] public Task> GetAllProtectedBranchUserRestrictions(string owner, string name, string branch) { @@ -1056,6 +1105,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + [Preview("luke-cage")] [ManualRoute("GET", "/repositories/{id}/branches/{branch}/protection/restrictions/users")] public Task> GetAllProtectedBranchUserRestrictions(long repositoryId, string branch) { @@ -1074,6 +1124,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// List of users with push access + [Preview("luke-cage")] [ManualRoute("UPDATE", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions/users")] public Task> UpdateProtectedBranchUserRestrictions(string owner, string name, string branch, BranchProtectionUserCollection users) { @@ -1094,6 +1145,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// List of users with push access + [Preview("luke-cage")] [ManualRoute("PUT", "/repositories/{id}/branches/{branch}/protection/restrictions/users")] public Task> UpdateProtectedBranchUserRestrictions(long repositoryId, string branch, BranchProtectionUserCollection users) { @@ -1113,6 +1165,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// List of users with push access to add + [Preview("luke-cage")] [ManualRoute("POST", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions/users")] public Task> AddProtectedBranchUserRestrictions(string owner, string name, string branch, BranchProtectionUserCollection users) { @@ -1133,6 +1186,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// List of users with push access to add + [Preview("luke-cage")] [ManualRoute("POST", "/repositories/{id}/branches/{branch}/protection/restrictions/users")] public Task> AddProtectedBranchUserRestrictions(long repositoryId, string branch, BranchProtectionUserCollection users) { @@ -1152,6 +1206,7 @@ namespace Octokit /// The name of the repository /// The name of the branch /// List of users with push access to remove + [Preview("luke-cage")] [ManualRoute("DELETE", "/repos/{owner}/{name}/branches/{branch}/protection/restrictions/users")] public Task> DeleteProtectedBranchUserRestrictions(string owner, string name, string branch, BranchProtectionUserCollection users) { @@ -1172,6 +1227,7 @@ namespace Octokit /// The Id of the repository /// The name of the branch /// List of users with push access to remove + [Preview("luke-cage")] [ManualRoute("DELETE", "/repositories/{id}/branches/{branch}/protection/restrictions/users")] public Task> DeleteProtectedBranchUserRestrictions(long repositoryId, string branch, BranchProtectionUserCollection users) { diff --git a/Octokit/Clients/RepositoryCommentsClient.cs b/Octokit/Clients/RepositoryCommentsClient.cs index 07a85779..ff98d29b 100644 --- a/Octokit/Clients/RepositoryCommentsClient.cs +++ b/Octokit/Clients/RepositoryCommentsClient.cs @@ -27,6 +27,7 @@ namespace Octokit /// The name of the repository /// The comment id /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/comments/{number}")] public Task Get(string owner, string name, int number) { @@ -42,6 +43,7 @@ namespace Octokit /// The Id of the repository /// The comment id /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/comments/{number}")] public Task Get(long repositoryId, int number) { @@ -81,6 +83,7 @@ namespace Octokit /// The name of the repository /// Options to change the API response /// http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/comments")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { @@ -97,6 +100,7 @@ namespace Octokit /// The Id of the repository /// Options to change the API response /// http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/comments")] public Task> GetAllForRepository(long repositoryId, ApiOptions options) { @@ -144,6 +148,7 @@ namespace Octokit /// The sha of the commit /// Options to change the API response /// http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit + [Preview("squirrel-girl")] [ManualRoute("GET", "/repos/{owner}/{name}/commits/{sha}/comments")] public Task> GetAllForCommit(string owner, string name, string sha, ApiOptions options) { @@ -162,6 +167,7 @@ namespace Octokit /// The sha of the commit /// Options to change the API response /// http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit + [Preview("squirrel-girl")] [ManualRoute("GET", "/repositories/{id}/commits/{sha}/comments")] public Task> GetAllForCommit(long repositoryId, string sha, ApiOptions options) { diff --git a/Octokit/Helpers/AcceptHeaders.cs b/Octokit/Helpers/AcceptHeaders.cs index 45cbbd63..6e9f38bf 100644 --- a/Octokit/Helpers/AcceptHeaders.cs +++ b/Octokit/Helpers/AcceptHeaders.cs @@ -30,7 +30,7 @@ namespace Octokit public const string MigrationsApiPreview = "application/vnd.github.wyandotte-preview+json"; - public const string ReactionsPreview = "application/vnd.github.squirrel-girl-preview"; + public const string ReactionsPreview = "application/vnd.github.squirrel-girl-preview+json"; public const string SignatureVerificationPreview = "application/vnd.github.cryptographer-preview+sha"; @@ -43,7 +43,7 @@ namespace Octokit public const string PagesApiPreview = "application/vnd.github.mister-fantastic-preview+json"; - public const string IssueTimelineApiPreview = "application/vnd.github.mockingbird-preview"; + public const string IssueTimelineApiPreview = "application/vnd.github.mockingbird-preview+json"; public const string RepositoryTrafficApiPreview = "application/vnd.github.spiderman-preview"; @@ -69,10 +69,12 @@ namespace Octokit public const string ProtectedBranchesRequiredApprovingApiPreview = "application/vnd.github.luke-cage-preview+json"; - public const string IssueEventsApiPreview = "application/vnd.github.starfox-preview"; + public const string IssueEventsApiPreview = "application/vnd.github.starfox-preview+json"; public const string DeploymentStatusesPreview = "application/vnd.github.flash-preview+json"; + public const string OAuthApplicationsPreview = "application/vnd.github.doctor-strange-preview+json"; + /// /// Combines multiple preview headers. GitHub API supports Accept header with multiple /// values separated by comma. diff --git a/Octokit/Helpers/PreviewAttribute.cs b/Octokit/Helpers/PreviewAttribute.cs new file mode 100644 index 00000000..5a125a35 --- /dev/null +++ b/Octokit/Helpers/PreviewAttribute.cs @@ -0,0 +1,20 @@ +using System; + +namespace Octokit +{ + /// + /// Metadata for tracking which endpoints rely on preview API behaviour + /// + /// https://developer.github.com/v3/previews/ + + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)] + public class PreviewAttribute : Attribute + { + public string Name { get; private set; } + + public PreviewAttribute(string name) + { + this.Name = name; + } + } +}