Skip to content

Commit

Permalink
remove deprecated code for old Check Suites API
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Mar 5, 2020
1 parent f968856 commit 2c8455d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 107 deletions.
25 changes: 1 addition & 24 deletions Octokit.Reactive/Clients/IObservableCheckSuitesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,29 +142,6 @@ public interface IObservableCheckSuitesClient
/// <param name="newCheckSuite">Details of the Check Suite to create</param>
IObservable<CheckSuite> Create(long repositoryId, NewCheckSuite newCheckSuite);

/// <summary>
/// Triggers GitHub to create a new check suite, without pushing new code to a repository
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/checks/suites/#request-check-suites">Check Suites API documentation</a> for more information.
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="request">Details of the Check Suite request</param>
[Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")]
IObservable<bool> Request(string owner, string name, CheckSuiteTriggerRequest request);

/// <summary>
/// Triggers GitHub to create a new check suite, without pushing new code to a repository
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/checks/suites/#request-check-suites">Check Suites API documentation</a> for more information.
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="request">Details of the Check Suite request</param>
[Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")]
IObservable<bool> Request(long repositoryId, CheckSuiteTriggerRequest request);

/// <summary>
/// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository
/// </summary>
Expand All @@ -186,4 +163,4 @@ public interface IObservableCheckSuitesClient
/// <param name="checkSuiteId">The Id of the check suite</param>
IObservable<bool> Rerequest(long repositoryId, long checkSuiteId);
}
}
}
37 changes: 1 addition & 36 deletions Octokit.Reactive/Clients/ObservableCheckSuitesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,41 +234,6 @@ public IObservable<CheckSuite> Create(long repositoryId, NewCheckSuite newCheckS
return _client.Create(repositoryId, newCheckSuite).ToObservable();
}

/// <summary>
/// Triggers GitHub to create a new check suite, without pushing new code to a repository
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/checks/suites/#request-check-suites">Check Suites API documentation</a> for more information.
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="request">Details of the Check Suite request</param>
[Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")]
public IObservable<bool> Request(string owner, string name, CheckSuiteTriggerRequest request)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(request, nameof(request));

return _client.Request(owner, name, request).ToObservable();
}

/// <summary>
/// Triggers GitHub to create a new check suite, without pushing new code to a repository
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/checks/suites/#request-check-suites">Check Suites API documentation</a> for more information.
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="request">Details of the Check Suite request</param>
[Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")]
public IObservable<bool> Request(long repositoryId, CheckSuiteTriggerRequest request)
{
Ensure.ArgumentNotNull(request, nameof(request));

return _client.Request(repositoryId, request).ToObservable();
}

/// <summary>
/// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository
/// </summary>
Expand Down Expand Up @@ -299,4 +264,4 @@ public IObservable<bool> Rerequest(long repositoryId, long checkSuiteId)
return _client.Rerequest(repositoryId, checkSuiteId).ToObservable();
}
}
}
}
25 changes: 1 addition & 24 deletions Octokit/Clients/ICheckSuitesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,29 +143,6 @@ public interface ICheckSuitesClient
/// <param name="newCheckSuite">Details of the Check Suite to create</param>
Task<CheckSuite> Create(long repositoryId, NewCheckSuite newCheckSuite);

/// <summary>
/// Triggers GitHub to create a new check suite, without pushing new code to a repository
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/checks/suites/#request-check-suites">Check Suites API documentation</a> for more information.
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="request">Details of the Check Suite request</param>
[Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")]
Task<bool> Request(string owner, string name, CheckSuiteTriggerRequest request);

/// <summary>
/// Triggers GitHub to create a new check suite, without pushing new code to a repository
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/checks/suites/#request-check-suites">Check Suites API documentation</a> for more information.
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="request">Details of the Check Suite request</param>
[Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")]
Task<bool> Request(long repositoryId, CheckSuiteTriggerRequest request);

/// <summary>
/// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository
/// </summary>
Expand All @@ -187,4 +164,4 @@ public interface ICheckSuitesClient
/// <param name="checkSuiteId">The Id of the check suite</param>
Task<bool> Rerequest(long repositoryId, long checkSuiteId);
}
}
}
23 changes: 0 additions & 23 deletions Octokit/Helpers/ApiUrls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4090,29 +4090,6 @@ public static Uri CheckSuites(string owner, string repo)
return "repos/{0}/{1}/check-suites".FormatUri(owner, repo);
}

/// <summary>
/// Returns the <see cref="Uri"/> that handles the check suite requests for the repository.
/// </summary>
/// <param name="repositoryId">The Id of the repository</param>
/// <returns>The <see cref="Uri"/> that handles the check suite requests for the repository.</returns>
[Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")]
public static Uri CheckSuiteRequests(long repositoryId)
{
return "repositories/{0}/check-suite-requests".FormatUri(repositoryId);
}

/// <summary>
/// Returns the <see cref="Uri"/> that handles the check suite requests for the repository.
/// </summary>
/// <param name="owner">The owner of repo</param>
/// <param name="repo">The name of repo</param>
/// <returns>The <see cref="Uri"/> that handles the check suite requests for the repository.</returns>
[Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")]
public static Uri CheckSuiteRequests(string owner, string repo)
{
return "repos/{0}/{1}/check-suite-requests".FormatUri(owner, repo);
}

/// <summary>
/// Returns the <see cref="Uri"/> that handles the check suite requests for the repository.
/// </summary>
Expand Down

0 comments on commit 2c8455d

Please sign in to comment.