Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit 92585b2

Browse files
kolaentelunny
authored andcommitted
Modified assignees field in issue struct for preperation of go-gitea/gitea#3705 (#99)
* Modified assignees field in issue struct for preperation of go-gitea/gitea#1884 * Modified assignees field in pr struct for preperation of go-gitea/gitea#1884 * Re-Added `Assignee` * Added missing `assignees` * fmt
1 parent 39c609e commit 92585b2

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

gitea/issue.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ type CreateIssueOption struct {
9090
Title string `json:"title" binding:"Required"`
9191
Body string `json:"body"`
9292
// username of assignee
93-
Assignee string `json:"assignee"`
93+
Assignee string `json:"assignee"`
94+
Assignees []string `json:"assignees"`
9495
// milestone id
9596
Milestone int64 `json:"milestone"`
9697
// list of label ids
@@ -111,11 +112,12 @@ func (c *Client) CreateIssue(owner, repo string, opt CreateIssueOption) (*Issue,
111112

112113
// EditIssueOption options for editing an issue
113114
type EditIssueOption struct {
114-
Title string `json:"title"`
115-
Body *string `json:"body"`
116-
Assignee *string `json:"assignee"`
117-
Milestone *int64 `json:"milestone"`
118-
State *string `json:"state"`
115+
Title string `json:"title"`
116+
Body *string `json:"body"`
117+
Assignee *string `json:"assignee"`
118+
Assignees []string `json:"assignees"`
119+
Milestone *int64 `json:"milestone"`
120+
State *string `json:"state"`
119121
}
120122

121123
// EditIssue modify an existing issue for a given repository

gitea/pull.go

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,14 @@ func (c *Client) GetPullRequest(owner, repo string, index int64) (*PullRequest,
8080

8181
// CreatePullRequestOption options when creating a pull request
8282
type CreatePullRequestOption struct {
83-
Head string `json:"head" binding:"Required"`
84-
Base string `json:"base" binding:"Required"`
85-
Title string `json:"title" binding:"Required"`
86-
Body string `json:"body"`
87-
Assignee string `json:"assignee"`
88-
Milestone int64 `json:"milestone"`
89-
Labels []int64 `json:"labels"`
83+
Head string `json:"head" binding:"Required"`
84+
Base string `json:"base" binding:"Required"`
85+
Title string `json:"title" binding:"Required"`
86+
Body string `json:"body"`
87+
Assignee string `json:"assignee"`
88+
Assignees []string `json:"assignees"`
89+
Milestone int64 `json:"milestone"`
90+
Labels []int64 `json:"labels"`
9091
}
9192

9293
// CreatePullRequest create pull request with options
@@ -102,12 +103,13 @@ func (c *Client) CreatePullRequest(owner, repo string, opt CreatePullRequestOpti
102103

103104
// EditPullRequestOption options when modify pull request
104105
type EditPullRequestOption struct {
105-
Title string `json:"title"`
106-
Body string `json:"body"`
107-
Assignee string `json:"assignee"`
108-
Milestone int64 `json:"milestone"`
109-
Labels []int64 `json:"labels"`
110-
State *string `json:"state"`
106+
Title string `json:"title"`
107+
Body string `json:"body"`
108+
Assignee string `json:"assignee"`
109+
Assignees []string `json:"assignees"`
110+
Milestone int64 `json:"milestone"`
111+
Labels []int64 `json:"labels"`
112+
State *string `json:"state"`
111113
}
112114

113115
// EditPullRequest modify pull request with PR id and options

0 commit comments

Comments
 (0)