Skip to content

Commit cfcf1ca

Browse files
author
chhsia0
committed
Added PR creation API call.
1 parent ee0770c commit cfcf1ca

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scm/pr.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ type (
3030
Updated time.Time
3131
}
3232

33+
// PullRequestInput provides the input fields required for creating a pull request.
34+
PullRequestInput struct {
35+
Title string
36+
Body string
37+
Source string
38+
Target string
39+
}
40+
3341
// PullRequestListOptions provides options for querying
3442
// a list of repository merge requests.
3543
PullRequestListOptions struct {
@@ -70,6 +78,9 @@ type (
7078
// Close closes the repository pull request.
7179
Close(context.Context, string, int) (*Response, error)
7280

81+
// Create creates a new pull request.
82+
Create(context.Context, string, *PullRequestInput) (*PullRequest, *Response, error)
83+
7384
// CreateComment creates a new pull request comment.
7485
CreateComment(context.Context, string, int, *CommentInput) (*Comment, *Response, error)
7586

0 commit comments

Comments
 (0)