Skip to content

Commit

Permalink
Support pull requests as project cards
Browse files Browse the repository at this point in the history
  • Loading branch information
boblangley committed Apr 29, 2020
1 parent 692655f commit ad75b43
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Octokit.Tests.Integration/Clients/ProjectCardsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,21 @@ public async Task CreatesIssueCard()
Assert.NotNull(card);
}

[IntegrationTest]
public async Task CreatesPullRequestCard()
{
await _github.CreateTheWorld(_context.Repository);

var project = await CreateRepositoryProjectHelper(_github, _context.RepositoryId);

var pullRequest = await _github.CreatePullRequest(_context.Repository);

var column = await CreateColumnHelper(_github, project.Id);
var card = await CreateIssueCardHelper(_github, pullRequest.Number, column.Id);

Assert.NotNull(card);
}

public void Dispose()
{
if (_context != null)
Expand Down
6 changes: 4 additions & 2 deletions Octokit/Models/Request/NewProjectCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ internal string DebuggerDisplay

public enum ProjectCardContentType
{
[Parameter(Value = "Issue")]
Issue
[Parameter(Value = nameof(Issue))]
Issue,
[Parameter(Value = nameof(PullRequest))]
PullRequest
}
}

0 comments on commit ad75b43

Please sign in to comment.