@@ -41,6 +41,9 @@ type PullRequest struct {
41
41
Head * PRBranchInfo `json:"head"`
42
42
MergeBase string `json:"merge_base"`
43
43
44
+ // swagger:strfmt date-time
45
+ Deadline * time.Time `json:"due_date"`
46
+
44
47
// swagger:strfmt date-time
45
48
Created * time.Time `json:"created_at"`
46
49
// swagger:strfmt date-time
@@ -82,14 +85,16 @@ func (c *Client) GetPullRequest(owner, repo string, index int64) (*PullRequest,
82
85
83
86
// CreatePullRequestOption options when creating a pull request
84
87
type CreatePullRequestOption struct {
85
- Head string `json:"head" binding:"Required"`
86
- Base string `json:"base" binding:"Required"`
87
- Title string `json:"title" binding:"Required"`
88
- Body string `json:"body"`
89
- Assignee string `json:"assignee"`
90
- Assignees []string `json:"assignees"`
91
- Milestone int64 `json:"milestone"`
92
- Labels []int64 `json:"labels"`
88
+ Head string `json:"head" binding:"Required"`
89
+ Base string `json:"base" binding:"Required"`
90
+ Title string `json:"title" binding:"Required"`
91
+ Body string `json:"body"`
92
+ Assignee string `json:"assignee"`
93
+ Assignees []string `json:"assignees"`
94
+ Milestone int64 `json:"milestone"`
95
+ Labels []int64 `json:"labels"`
96
+ // swagger:strfmt date-time
97
+ Deadline * time.Time `json:"due_date"`
93
98
}
94
99
95
100
// CreatePullRequest create pull request with options
@@ -105,13 +110,15 @@ func (c *Client) CreatePullRequest(owner, repo string, opt CreatePullRequestOpti
105
110
106
111
// EditPullRequestOption options when modify pull request
107
112
type EditPullRequestOption struct {
108
- Title string `json:"title"`
109
- Body string `json:"body"`
110
- Assignee string `json:"assignee"`
111
- Assignees []string `json:"assignees"`
112
- Milestone int64 `json:"milestone"`
113
- Labels []int64 `json:"labels"`
114
- State * string `json:"state"`
113
+ Title string `json:"title"`
114
+ Body string `json:"body"`
115
+ Assignee string `json:"assignee"`
116
+ Assignees []string `json:"assignees"`
117
+ Milestone int64 `json:"milestone"`
118
+ Labels []int64 `json:"labels"`
119
+ State * string `json:"state"`
120
+ // swagger:strfmt date-time
121
+ Deadline * time.Time `json:"due_date"`
115
122
}
116
123
117
124
// EditPullRequest modify pull request with PR id and options
0 commit comments