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
This commit is contained in:
kolaente 2018-03-22 15:32:16 +01:00 committed by Lunny Xiao
parent 39c609e903
commit 92585b27a0
2 changed files with 23 additions and 19 deletions

View File

@ -90,7 +90,8 @@ type CreateIssueOption struct {
Title string `json:"title" binding:"Required"`
Body string `json:"body"`
// username of assignee
Assignee string `json:"assignee"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
// milestone id
Milestone int64 `json:"milestone"`
// list of label ids
@ -111,11 +112,12 @@ func (c *Client) CreateIssue(owner, repo string, opt CreateIssueOption) (*Issue,
// EditIssueOption options for editing an issue
type EditIssueOption struct {
Title string `json:"title"`
Body *string `json:"body"`
Assignee *string `json:"assignee"`
Milestone *int64 `json:"milestone"`
State *string `json:"state"`
Title string `json:"title"`
Body *string `json:"body"`
Assignee *string `json:"assignee"`
Assignees []string `json:"assignees"`
Milestone *int64 `json:"milestone"`
State *string `json:"state"`
}
// EditIssue modify an existing issue for a given repository

View File

@ -80,13 +80,14 @@ func (c *Client) GetPullRequest(owner, repo string, index int64) (*PullRequest,
// CreatePullRequestOption options when creating a pull request
type CreatePullRequestOption struct {
Head string `json:"head" binding:"Required"`
Base string `json:"base" binding:"Required"`
Title string `json:"title" binding:"Required"`
Body string `json:"body"`
Assignee string `json:"assignee"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
Head string `json:"head" binding:"Required"`
Base string `json:"base" binding:"Required"`
Title string `json:"title" binding:"Required"`
Body string `json:"body"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
}
// CreatePullRequest create pull request with options
@ -102,12 +103,13 @@ func (c *Client) CreatePullRequest(owner, repo string, opt CreatePullRequestOpti
// EditPullRequestOption options when modify pull request
type EditPullRequestOption struct {
Title string `json:"title"`
Body string `json:"body"`
Assignee string `json:"assignee"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
State *string `json:"state"`
Title string `json:"title"`
Body string `json:"body"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
State *string `json:"state"`
}
// EditPullRequest modify pull request with PR id and options