aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/sdk/gitea/issue.go
diff options
context:
space:
mode:
authorkolaente <konrad@kola-entertainments.de>2018-05-01 21:05:28 +0200
committerLauris BH <lauris@nix.lv>2018-05-01 22:05:28 +0300
commit1a97030017cd09b75f6c8d484e075f4eced1e001 (patch)
tree78fd666ad8693a91377807e77698ec44ddec7c58 /vendor/code.gitea.io/sdk/gitea/issue.go
parent85d14cc229263c5788cac9370ac60e9582f9de6c (diff)
downloadgitea-1a97030017cd09b75f6c8d484e075f4eced1e001.tar.gz
gitea-1a97030017cd09b75f6c8d484e075f4eced1e001.zip
Issue due date (#3794)
* Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/issue.go')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/issue.go23
1 files changed, 17 insertions, 6 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/issue.go b/vendor/code.gitea.io/sdk/gitea/issue.go
index 206c52a59e..27809ca3b4 100644
--- a/vendor/code.gitea.io/sdk/gitea/issue.go
+++ b/vendor/code.gitea.io/sdk/gitea/issue.go
@@ -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
@@ -49,6 +50,10 @@ type Issue struct {
Created time.Time `json:"created_at"`
// swagger:strfmt date-time
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"`
}
@@ -89,7 +94,10 @@ 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"`
+ // swagger:strfmt date-time
+ Deadline *time.Time `json:"due_date"`
// milestone id
Milestone int64 `json:"milestone"`
// list of label ids
@@ -110,11 +118,14 @@ 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"`
+ // swagger:strfmt date-time
+ Deadline *time.Time `json:"due_date"`
}
// EditIssue modify an existing issue for a given repository