mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 20:30:41 +00:00
Implement new Project Card archiving (#1842)
* add Archived to ProjectCard response add Archived to ProjectCardUpdate update integration tests * Add ProjectCardRequest model and update GetAll calls to use it Update unit tests Update integration tests * skip_branch_with_pr still ends up building the branch on the initial push, so let's only build master instead
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Octokit.Reactive.Internal;
|
||||
using System;
|
||||
using System.Reactive.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
@@ -48,9 +47,41 @@ namespace Octokit.Reactive
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
|
||||
return GetAll(columnId, new ProjectCardRequest(), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all cards.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/projects/#list-projects-cards">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="columnId">The id of the column</param>
|
||||
/// <param name="request">Used to filter the list of project cards returned</param>
|
||||
public IObservable<ProjectCard> GetAll(int columnId, ProjectCardRequest request)
|
||||
{
|
||||
Ensure.ArgumentNotNull(request, nameof(request));
|
||||
|
||||
return GetAll(columnId, request, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all cards.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/projects/#list-projects-cards">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="columnId">The id of the column</param>
|
||||
/// <param name="request">Used to filter the list of project cards returned</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
public IObservable<ProjectCard> GetAll(int columnId, ProjectCardRequest request, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(request, nameof(request));
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
|
||||
var url = ApiUrls.ProjectCards(columnId);
|
||||
|
||||
return _connection.GetAndFlattenAllPages<ProjectCard>(url, new Dictionary<string, string>(), AcceptHeaders.ProjectsApiPreview, options);
|
||||
return _connection.GetAndFlattenAllPages<ProjectCard>(url, request.ToParametersDictionary(), AcceptHeaders.ProjectsApiPreview, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user