diff options
author | kolaente <konrad@kola-entertainments.de> | 2018-05-09 18:29:04 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-05-09 19:29:04 +0300 |
commit | 95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd (patch) | |
tree | ebfeb5b898f72fc57ac1fe9680374fdb4bc91aeb /models/pull.go | |
parent | 238a997ec0b5d3e3bed0e55edcacebb44f86d373 (diff) | |
download | gitea-95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd.tar.gz gitea-95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd.zip |
Multiple assignees (#3705)
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/models/pull.go b/models/pull.go index 5f4a6e2054..d23d885b6c 100644 --- a/models/pull.go +++ b/models/pull.go @@ -198,6 +198,7 @@ func (pr *PullRequest) APIFormat() *api.PullRequest { Labels: apiIssue.Labels, Milestone: apiIssue.Milestone, Assignee: apiIssue.Assignee, + Assignees: apiIssue.Assignees, State: apiIssue.State, Comments: apiIssue.Comments, HTMLURL: pr.Issue.HTMLURL(), @@ -719,7 +720,7 @@ func (pr *PullRequest) testPatch() (err error) { } // NewPullRequest creates new pull request with labels for repository. -func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []string, pr *PullRequest, patch []byte) (err error) { +func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []string, pr *PullRequest, patch []byte, assigneeIDs []int64) (err error) { sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { @@ -732,7 +733,11 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str LabelIDs: labelIDs, Attachments: uuids, IsPull: true, + AssigneeIDs: assigneeIDs, }); err != nil { + if IsErrUserDoesNotHaveAccessToRepo(err) { + return err + } return fmt.Errorf("newIssue: %v", err) } |