diff --git a/gitea/issue.go b/gitea/issue.go index 9cf5924..199f2c7 100644 --- a/gitea/issue.go +++ b/gitea/issue.go @@ -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 diff --git a/gitea/pull.go b/gitea/pull.go index cea202a..6f3f240 100644 --- a/gitea/pull.go +++ b/gitea/pull.go @@ -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