diff --git a/Octokit.Tests.Integration/Clients/ProjectCardsClientTests.cs b/Octokit.Tests.Integration/Clients/ProjectCardsClientTests.cs index 3c127e0b9d..f4dc817a14 100644 --- a/Octokit.Tests.Integration/Clients/ProjectCardsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/ProjectCardsClientTests.cs @@ -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) diff --git a/Octokit/Models/Request/NewProjectCard.cs b/Octokit/Models/Request/NewProjectCard.cs index 35c8cb2886..a726467bdc 100644 --- a/Octokit/Models/Request/NewProjectCard.cs +++ b/Octokit/Models/Request/NewProjectCard.cs @@ -46,7 +46,9 @@ internal string DebuggerDisplay public enum ProjectCardContentType { - [Parameter(Value = "Issue")] - Issue + [Parameter(Value = nameof(Issue))] + Issue, + [Parameter(Value = nameof(PullRequest))] + PullRequest } }