Preparation for Issue due dates (go-gitea/gitea#2533) (#103)

* Added deadline for issue

* Added deadline for pull requests

* Added comment for swagger date format
This commit is contained in:
kolaente 2018-04-17 02:54:29 +02:00 committed by Lunny Xiao
parent 790adaa56b
commit 142acef5ce
2 changed files with 34 additions and 21 deletions

View file

@ -52,6 +52,8 @@ type Issue struct {
Updated time.Time `json:"updated_at"`
// swagger:strfmt date-time
Closed *time.Time `json:"closed_at"`
// swagger:strfmt date-time
Deadline *time.Time `json:"due_date"`
PullRequest *PullRequestMeta `json:"pull_request"`
}
@ -94,6 +96,8 @@ type CreateIssueOption struct {
// username of assignee
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
// swagger:strfmt date-time
Deadline *time.Time `json:"due_date"`
// milestone id
Milestone int64 `json:"milestone"`
// list of label ids
@ -120,6 +124,8 @@ type EditIssueOption struct {
Assignees []string `json:"assignees"`
Milestone *int64 `json:"milestone"`
State *string `json:"state"`
// swagger:strfmt date-time
Deadline *time.Time `json:"due_date"`
}
// EditIssue modify an existing issue for a given repository

View file

@ -41,6 +41,9 @@ type PullRequest struct {
Head *PRBranchInfo `json:"head"`
MergeBase string `json:"merge_base"`
// swagger:strfmt date-time
Deadline *time.Time `json:"due_date"`
// swagger:strfmt date-time
Created *time.Time `json:"created_at"`
// swagger:strfmt date-time
@ -90,6 +93,8 @@ type CreatePullRequestOption struct {
Assignees []string `json:"assignees"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
// swagger:strfmt date-time
Deadline *time.Time `json:"due_date"`
}
// CreatePullRequest create pull request with options
@ -112,6 +117,8 @@ type EditPullRequestOption struct {
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
State *string `json:"state"`
// swagger:strfmt date-time
Deadline *time.Time `json:"due_date"`
}
// EditPullRequest modify pull request with PR id and options