Ref string `json:"ref"`
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
- Assignee *User `json:"assignee"`
- Assignees []*User `json:"assignees"`
+ // deprecated
+ Assignee *User `json:"assignee"`
+ Assignees []*User `json:"assignees"`
// Whether the issue is open or closed
//
// type: string
// required:true
Title string `json:"title" binding:"Required"`
Body string `json:"body"`
- // username of assignee
+ Ref string `json:"ref"`
+ // deprecated
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
// swagger:strfmt date-time
// EditIssueOption options for editing an issue
type EditIssueOption struct {
- Title string `json:"title"`
- Body *string `json:"body"`
+ Title string `json:"title"`
+ Body *string `json:"body"`
+ Ref *string `json:"ref"`
+ // deprecated
Assignee *string `json:"assignee"`
Assignees []string `json:"assignees"`
Milestone *int64 `json:"milestone"`
PosterID: ctx.User.ID,
Poster: ctx.User,
Content: form.Body,
+ Ref: form.Ref,
DeadlineUnix: deadlineUnix,
}
if form.Body != nil {
issue.Content = *form.Body
}
+ if form.Ref != nil {
+ err = issue_service.ChangeIssueRef(issue, ctx.User, *form.Ref)
+ if err != nil {
+ ctx.Error(http.StatusInternalServerError, "UpdateRef", err)
+ return
+ }
+ }
// Update or remove the deadline, only if set and allowed
if (form.Deadline != nil || form.RemoveDeadline != nil) && canWrite {
],
"properties": {
"assignee": {
- "description": "username of assignee",
+ "description": "deprecated",
"type": "string",
"x-go-name": "Assignee"
},
"format": "int64",
"x-go-name": "Milestone"
},
+ "ref": {
+ "type": "string",
+ "x-go-name": "Ref"
+ },
"title": {
"type": "string",
"x-go-name": "Title"
"type": "object",
"properties": {
"assignee": {
+ "description": "deprecated",
"type": "string",
"x-go-name": "Assignee"
},
"format": "int64",
"x-go-name": "Milestone"
},
+ "ref": {
+ "type": "string",
+ "x-go-name": "Ref"
+ },
"state": {
"type": "string",
"x-go-name": "State"