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

Modified assignees field in issue struct for preperation of go-gitea/gitea#3705 #99

Merged
merged 5 commits into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions gitea/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type Issue struct {
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
Assignee *User `json:"assignee"`
Assignees []*User `json:"assignees"`
// Whether the issue is open or closed
//
// type: string
Expand Down Expand Up @@ -89,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
Expand All @@ -110,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
Expand Down
29 changes: 16 additions & 13 deletions gitea/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type PullRequest struct {
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
Assignee *User `json:"assignee"`
Assignees []*User `json:"assignees"`
State StateType `json:"state"`
Comments int `json:"comments"`

Expand Down Expand Up @@ -79,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
Expand All @@ -101,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
Expand Down