Skip to content

Commit

Permalink
Merge pull request drone#67 from bigkevmcd/improve-fake-create-pr
Browse files Browse the repository at this point in the history
feat: Record the create pull request in the fake driver.
  • Loading branch information
jenkins-x-bot authored Jan 23, 2020
2 parents 8039690 + a6fb9d6 commit 08fb635
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scm/driver/fake/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func (s *pullService) DeleteComment(ctx context.Context, repo string, number int

func (s *pullService) Create(ctx context.Context, repo string, input *scm.PullRequestInput) (*scm.PullRequest, *scm.Response, error) {
f := s.data
f.PullRequestID++
answer := &scm.PullRequest{
Number: f.PullRequestID,
Title: input.Title,
Expand All @@ -139,6 +140,6 @@ func (s *pullService) Create(ctx context.Context, repo string, input *scm.PullRe
},
}
f.PullRequestsCreated[f.PullRequestID] = input
f.PullRequestID++
f.PullRequests[f.PullRequestID] = answer
return answer, nil, nil
}

0 comments on commit 08fb635

Please sign in to comment.