mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* [WIP] * add new method to add assignees for an issue * added new overloads * added unit tests * fixed missed overload calls * fixed inconsistency in tests * added integration tests * fixed errors in tests * fixed all remarks * added new overloads * added unit tests * added integration tests * fixed incorrect variable names * added new overloads * added unit tests * added itegration tests * fixed integration tests * removed extra empty lines * fixed errors in unit tests * added overloads on IObservableReleasesClient and IReleasesClient * added new unit tests * added integration tests * added Task as return value of unit tests * added Task as return parameter * added return value ReleasesClientTests * another try to get tests work * another one try * undo prev commit * fixed errors in tests * removed extra ThrowsAsync checks * added new overloads * added unit tests * added integration tests * added integration tests * Add ApiOptions overloads to IWatchedClient + tests. * Add ApiOptions overloads to IObservableWatchedClient + tests. * More tests. * fixed error in ObservableWatchedClient * added unit tests * added integration tests * added new overloads * added unit tests * added integration tests * renamed "Ensures" methods to deliver more consistency in code * fixed failed tests * Add ApiOptions overloads to methods on I(Observable)IssuesLabelsClient (#1329) * correcting a couple of tests (#1331) * Add ApiOption overloads to methods on I(Observable)OrganizationsClient (#1324) * Add ApiOptions overloads to methods on I(Observable)OrganizationMembersClient (#1332) * fix description * add new response for IssueAssignees * add constructor for IssueAssignees * add debugger display for NewAssignees * add methods for observable assignees client; new unit tests * add observable unit tests for add method * place AddAssignees under IssueClient * fix description * [WIP] add generic delete method * revert add assignees * add assignees key under issue client * remove IssueAssignees dependencies * fix type IssueAssignees * add remove method for issue assignees; finish generic delete method * unit tests for remove assignees * Add Assignees property to NewIssue and UpdateIssue requets Add Asignees property to Issue response Removed [SerializeNull] attribute from UpdateIssue.Assignee as this was causing it to remove assignee when none was specified Add a couple of integration tests to prove Assignees are being deserialised * rename NewAssignees to AssignessUpdate * change Assignees key description * check null Issue.ToUpdate method * add accept header for IssuesClientTests * Fix some more unit tests * add integration test Check if an assignee was added to an issue * fix merge conflicts * resolve conflicts * implement some hints from @ryangribble * resolve merge fixes * clean up * some more changes * create new repo Create a new repo for integrationtest 'CanRetrieveIssuesWithMultipleAssignees()' * fix merge * fix conflicts * fix xml * change test * change delete overloads * Fix tests * fix xml * Add helper function RemoveLabel * Add helper function RemoveAssignee * Format last commit * Add integration tests to exercise new Assignees field on IssueUpdate * GitHub API doesnt allow Assignee and Assignees properties to both be specified - API docs say that Assignee is deprecated so mark it [Obsolete] and dont populate it in Issue.ToUpdate() * Add Assignees field to PullRequest response object, and integration tests to verify it is populated. This field is not listed in the API docs but probing the API revealed it is included in payloads * add a couple of extra tests to verify the IssueUpdate.Labels is working correctly * Include assignees in ctor for consistency * fix IssueUpdate test for new Assignees field
78 lines
3.6 KiB
C#
78 lines
3.6 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Octokit
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Issue Assignees API.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/issues/assignees/">Issue Assignees API documentation</a> for more information.
|
|
/// </remarks>
|
|
public interface IAssigneesClient
|
|
{
|
|
/// <summary>
|
|
/// Gets all the available assignees (owner + collaborators) to which issues may be assigned.
|
|
/// </summary>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
Task<IReadOnlyList<User>> GetAllForRepository(string owner, string name);
|
|
|
|
/// <summary>
|
|
/// Gets all the available assignees (owner + collaborators) to which issues may be assigned.
|
|
/// </summary>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
Task<IReadOnlyList<User>> GetAllForRepository(long repositoryId);
|
|
|
|
/// <summary>
|
|
/// Gets all the available assignees (owner + collaborators) to which issues may be assigned.
|
|
/// </summary>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="options">The options to change API's response.</param>
|
|
Task<IReadOnlyList<User>> GetAllForRepository(string owner, string name, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Gets all the available assignees (owner + collaborators) to which issues may be assigned.
|
|
/// </summary>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="options">The options to change API's response.</param>
|
|
Task<IReadOnlyList<User>> GetAllForRepository(long repositoryId, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Checks to see if a user is an assignee for a repository.
|
|
/// </summary>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="assignee">Username of the prospective assignee</param>
|
|
Task<bool> CheckAssignee(string owner, string name, string assignee);
|
|
|
|
/// <summary>
|
|
/// Add assignees to a specified Issue.
|
|
/// </summary>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The issue number</param>
|
|
/// <param name="assignees">List of names of assignees to add</param>
|
|
/// <returns></returns>
|
|
Task<Issue> AddAssignees(string owner, string name, int number, AssigneesUpdate assignees);
|
|
|
|
/// <summary>
|
|
/// Remove assignees from a specified Issue.
|
|
/// </summary>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="number">The issue number</param>
|
|
/// <param name="assignees">List of assignees to remove</param>
|
|
/// <returns></returns>
|
|
Task<Issue> RemoveAssignees(string owner, string name, int number, AssigneesUpdate assignees);
|
|
|
|
/// <summary>
|
|
/// Checks to see if a user is an assignee for a repository.
|
|
/// </summary>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="assignee">Username of the prospective assignee</param>
|
|
Task<bool> CheckAssignee(long repositoryId, string assignee);
|
|
}
|
|
}
|