Skip to content

Commit

Permalink
feat: Removing accept header previews (#2515)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonruAlveus authored Aug 1, 2022
1 parent 840935a commit 2f7bd00
Show file tree
Hide file tree
Showing 138 changed files with 954 additions and 1,659 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public IObservable<PreReceiveEnvironment> GetAll(ApiOptions options)
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<PreReceiveEnvironment>(ApiUrls.AdminPreReceiveEnvironments(), null, AcceptHeaders.PreReceiveEnvironmentsPreview, options);
return _connection.GetAndFlattenAllPages<PreReceiveEnvironment>(ApiUrls.AdminPreReceiveEnvironments(), null, options);
}

/// <summary>
Expand Down
12 changes: 6 additions & 6 deletions Octokit.Reactive/Clients/ObservableCheckRunsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public IObservable<CheckRunsResponse> GetAllForReference(string owner, string na
Ensure.ArgumentNotNull(checkRunRequest, nameof(checkRunRequest));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<CheckRunsResponse>(ApiUrls.CheckRunsForReference(owner, name, reference), checkRunRequest.ToParametersDictionary(), AcceptHeaders.ChecksApiPreview, options);
return _connection.GetAndFlattenAllPages<CheckRunsResponse>(ApiUrls.CheckRunsForReference(owner, name, reference), checkRunRequest.ToParametersDictionary(), options);
}

/// <summary>
Expand All @@ -203,7 +203,7 @@ public IObservable<CheckRunsResponse> GetAllForReference(long repositoryId, stri
Ensure.ArgumentNotNull(checkRunRequest, nameof(checkRunRequest));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<CheckRunsResponse>(ApiUrls.CheckRunsForReference(repositoryId, reference), checkRunRequest.ToParametersDictionary(), AcceptHeaders.ChecksApiPreview, options);
return _connection.GetAndFlattenAllPages<CheckRunsResponse>(ApiUrls.CheckRunsForReference(repositoryId, reference), checkRunRequest.ToParametersDictionary(), options);
}

/// <summary>
Expand Down Expand Up @@ -289,7 +289,7 @@ public IObservable<CheckRunsResponse> GetAllForCheckSuite(string owner, string n
Ensure.ArgumentNotNull(checkRunRequest, nameof(checkRunRequest));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<CheckRunsResponse>(ApiUrls.CheckRunsForCheckSuite(owner, name, checkSuiteId), checkRunRequest.ToParametersDictionary(), AcceptHeaders.ChecksApiPreview, options);
return _connection.GetAndFlattenAllPages<CheckRunsResponse>(ApiUrls.CheckRunsForCheckSuite(owner, name, checkSuiteId), checkRunRequest.ToParametersDictionary(), options);
}

/// <summary>
Expand All @@ -307,7 +307,7 @@ public IObservable<CheckRunsResponse> GetAllForCheckSuite(long repositoryId, lon
Ensure.ArgumentNotNull(checkRunRequest, nameof(checkRunRequest));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<CheckRunsResponse>(ApiUrls.CheckRunsForCheckSuite(repositoryId, checkSuiteId), checkRunRequest.ToParametersDictionary(), AcceptHeaders.ChecksApiPreview, options);
return _connection.GetAndFlattenAllPages<CheckRunsResponse>(ApiUrls.CheckRunsForCheckSuite(repositoryId, checkSuiteId), checkRunRequest.ToParametersDictionary(), options);
}

/// <summary>
Expand Down Expand Up @@ -387,7 +387,7 @@ public IObservable<CheckRunAnnotation> GetAllAnnotations(string owner, string na
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<CheckRunAnnotation>(ApiUrls.CheckRunAnnotations(owner, name, checkRunId), null, AcceptHeaders.ChecksApiPreview, options);
return _connection.GetAndFlattenAllPages<CheckRunAnnotation>(ApiUrls.CheckRunAnnotations(owner, name, checkRunId), null, options);
}

/// <summary>
Expand All @@ -403,7 +403,7 @@ public IObservable<CheckRunAnnotation> GetAllAnnotations(long repositoryId, long
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<CheckRunAnnotation>(ApiUrls.CheckRunAnnotations(repositoryId, checkRunId), null, AcceptHeaders.ChecksApiPreview, options);
return _connection.GetAndFlattenAllPages<CheckRunAnnotation>(ApiUrls.CheckRunAnnotations(repositoryId, checkRunId), null, options);
}
}
}
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/ObservableCheckSuitesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public IObservable<CheckSuitesResponse> GetAllForReference(string owner, string
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<CheckSuitesResponse>(ApiUrls.CheckSuitesForReference(owner, name, reference), request.ToParametersDictionary(), AcceptHeaders.ChecksApiPreview, options);
return _connection.GetAndFlattenAllPages<CheckSuitesResponse>(ApiUrls.CheckSuitesForReference(owner, name, reference), request.ToParametersDictionary(), options);
}

/// <summary>
Expand All @@ -165,7 +165,7 @@ public IObservable<CheckSuitesResponse> GetAllForReference(long repositoryId, st
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<CheckSuitesResponse>(ApiUrls.CheckSuitesForReference(repositoryId, reference), request.ToParametersDictionary(), AcceptHeaders.ChecksApiPreview, options);
return _connection.GetAndFlattenAllPages<CheckSuitesResponse>(ApiUrls.CheckSuitesForReference(repositoryId, reference), request.ToParametersDictionary(), options);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public IObservable<Reaction> GetAll(string owner, string name, int number, ApiOp
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), null, options);
}

/// <summary>
Expand All @@ -112,7 +112,7 @@ public IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions op
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), null, options);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public IObservable<RepositoriesResponse> GetAllRepositoriesForCurrent()
/// <remarks>https://developer.github.com/v3/apps/installations/#list-repositories</remarks>
public IObservable<RepositoriesResponse> GetAllRepositoriesForCurrent(ApiOptions options)
{
return _connection.GetAndFlattenAllPages<RepositoriesResponse>(ApiUrls.InstallationRepositories(), null, AcceptHeaders.GitHubAppsPreview, options);
return _connection.GetAndFlattenAllPages<RepositoriesResponse>(ApiUrls.InstallationRepositories(), options);
}

/// <summary>
Expand All @@ -59,7 +59,7 @@ public IObservable<RepositoriesResponse> GetAllRepositoriesForCurrentUser(long i
/// <remarks>https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation</remarks>
public IObservable<RepositoriesResponse> GetAllRepositoriesForCurrentUser(long installationId, ApiOptions options)
{
return _connection.GetAndFlattenAllPages<RepositoriesResponse>(ApiUrls.UserInstallationRepositories(installationId), null, AcceptHeaders.GitHubAppsPreview, options);
return _connection.GetAndFlattenAllPages<RepositoriesResponse>(ApiUrls.UserInstallationRepositories(installationId), options);
}
}
}
6 changes: 3 additions & 3 deletions Octokit.Reactive/Clients/ObservableGitHubAppsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public IObservable<Installation> GetAllInstallationsForCurrent(ApiOptions option
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Installation>(ApiUrls.Installations(), null, AcceptHeaders.GitHubAppsPreview, options);
return _connection.GetAndFlattenAllPages<Installation>(ApiUrls.Installations(), null, options);
}

/// <summary>
Expand Down Expand Up @@ -102,7 +102,7 @@ public IObservable<Installation> GetInstallationForCurrent(long installationId)
/// <remarks>https://developer.github.com/v3/apps/#list-installations-for-user</remarks>
public IObservable<InstallationsResponse> GetAllInstallationsForCurrentUser()
{
return _connection.GetAndFlattenAllPages<InstallationsResponse>(ApiUrls.UserInstallations(), null, AcceptHeaders.GitHubAppsPreview);
return _connection.GetAndFlattenAllPages<InstallationsResponse>(ApiUrls.UserInstallations());
}

/// <summary>
Expand All @@ -111,7 +111,7 @@ public IObservable<InstallationsResponse> GetAllInstallationsForCurrentUser()
/// <remarks>https://developer.github.com/v3/apps/#list-installations-for-user</remarks>
public IObservable<InstallationsResponse> GetAllInstallationsForCurrentUser(ApiOptions options)
{
return _connection.GetAndFlattenAllPages<InstallationsResponse>(ApiUrls.UserInstallations(), null, AcceptHeaders.GitHubAppsPreview, options);
return _connection.GetAndFlattenAllPages<InstallationsResponse>(ApiUrls.UserInstallations(), options);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public IObservable<Reaction> GetAll(string owner, string name, int number, ApiOp
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(owner, name, number), null, options);
}

/// <summary>
Expand All @@ -109,7 +109,7 @@ public IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions op
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(repositoryId, number), null, options);
}

/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public IObservable<IssueComment> GetAllForRepository(string owner, string name,
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<IssueComment>(ApiUrls.IssueComments(owner, name), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<IssueComment>(ApiUrls.IssueComments(owner, name), request.ToParametersDictionary(), options);
}

/// <summary>
Expand All @@ -162,7 +162,7 @@ public IObservable<IssueComment> GetAllForRepository(long repositoryId, IssueCom
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<IssueComment>(ApiUrls.IssueComments(repositoryId), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<IssueComment>(ApiUrls.IssueComments(repositoryId), request.ToParametersDictionary(), options);
}

/// <summary>
Expand Down Expand Up @@ -269,7 +269,7 @@ public IObservable<IssueComment> GetAllForIssue(string owner, string name, int n
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<IssueComment>(ApiUrls.IssueComments(owner, name, number), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<IssueComment>(ApiUrls.IssueComments(owner, name, number), request.ToParametersDictionary(), options);

}

Expand All @@ -286,7 +286,7 @@ public IObservable<IssueComment> GetAllForIssue(long repositoryId, int number, I
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<IssueComment>(ApiUrls.IssueComments(repositoryId, number), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<IssueComment>(ApiUrls.IssueComments(repositoryId, number), request.ToParametersDictionary(), options);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public IObservable<Reaction> GetAll(string owner, string name, int number, ApiOp
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueReactions(owner, name, number), null, options);
}

/// <summary>
Expand All @@ -75,7 +75,7 @@ public IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions op
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueReactions(repositoryId, number), null, options);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Octokit.Reactive/Clients/ObservableIssueTimelineClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public IObservable<TimelineEventInfo> GetAllForIssue(string owner, string repo,
Ensure.ArgumentNotNullOrEmptyString(repo, nameof(repo));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<TimelineEventInfo>(ApiUrls.IssueTimeline(owner, repo, number), null, AcceptHeaders.IssueTimelineApiPreview, options);
return _connection.GetAndFlattenAllPages<TimelineEventInfo>(ApiUrls.IssueTimeline(owner, repo, number), null, options);
}

/// <summary>
Expand Down Expand Up @@ -82,7 +82,7 @@ public IObservable<TimelineEventInfo> GetAllForIssue(long repositoryId, int numb
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<TimelineEventInfo>(ApiUrls.IssueTimeline(repositoryId, number), null, AcceptHeaders.IssueTimelineApiPreview, options);
return _connection.GetAndFlattenAllPages<TimelineEventInfo>(ApiUrls.IssueTimeline(repositoryId, number), null, options);
}
}
}
8 changes: 4 additions & 4 deletions Octokit.Reactive/Clients/ObservableIssuesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public IObservable<Issue> GetAllForCurrent(IssueRequest request, ApiOptions opti
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(), request.ToParametersDictionary(), options);
}

/// <summary>
Expand Down Expand Up @@ -209,7 +209,7 @@ public IObservable<Issue> GetAllForOwnedAndMemberRepositories(IssueRequest reque
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.IssuesForOwnedAndMember(), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.IssuesForOwnedAndMember(), request.ToParametersDictionary(), options);
}

/// <summary>
Expand Down Expand Up @@ -273,7 +273,7 @@ public IObservable<Issue> GetAllForOrganization(string organization, IssueReques
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(organization), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(organization), request.ToParametersDictionary(), options);
}

/// <summary>
Expand Down Expand Up @@ -387,7 +387,7 @@ public IObservable<Issue> GetAllForRepository(string owner, string name, Reposit
Ensure.ArgumentNotNull(request, nameof(request));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(owner, name), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.Issues(owner, name), request.ToParametersDictionary(), options);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/ObservableMigrationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public IObservable<Migration> GetAll(string org, ApiOptions options)
{
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Migration>(ApiUrls.EnterpriseMigrations(org), null, AcceptHeaders.MigrationsApiPreview, options);
return _connection.GetAndFlattenAllPages<Migration>(ApiUrls.EnterpriseMigrations(org), null, options);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ public IObservable<OrganizationMembershipInvitation> GetAllPendingInvitations(st
Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<OrganizationMembershipInvitation>(ApiUrls.OrganizationPendingInvititations(org), null, AcceptHeaders.OrganizationMembershipPreview, options);
return _connection.GetAndFlattenAllPages<OrganizationMembershipInvitation>(ApiUrls.OrganizationPendingInvititations(org), null, options);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public IObservable<User> GetAll(string org, ApiOptions options)
Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<User>(ApiUrls.OutsideCollaborators(org), null, AcceptHeaders.OrganizationMembershipPreview, options);
return _connection.GetAndFlattenAllPages<User>(ApiUrls.OutsideCollaborators(org), null, options);
}

/// <summary>
Expand Down Expand Up @@ -92,7 +92,7 @@ public IObservable<User> GetAll(string org, OrganizationMembersFilter filter, Ap
Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<User>(ApiUrls.OutsideCollaborators(org, filter), null, AcceptHeaders.OrganizationMembershipPreview, options);
return _connection.GetAndFlattenAllPages<User>(ApiUrls.OutsideCollaborators(org, filter), null, options);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Clients/ObservableProjectCardsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public IObservable<ProjectCard> GetAll(int columnId, ProjectCardRequest request,

var url = ApiUrls.ProjectCards(columnId);

return _connection.GetAndFlattenAllPages<ProjectCard>(url, request.ToParametersDictionary(), AcceptHeaders.ProjectsApiPreview, options);
return _connection.GetAndFlattenAllPages<ProjectCard>(url, request.ToParametersDictionary(), options);
}

/// <summary>
Expand Down
Loading

0 comments on commit 2f7bd00

Please sign in to comment.