Issue due date api (#3890)
* Implemented basic api endpoint to manage deadlines * Fixed checking for permissions * Updating a deadline from the ui is now entirely done via the api * cleanup * Cosmetics * fixed lint + fmt * Added swagger model definition for deadline response * Updated gitea-sdk * Updated gitea-sdk * More cleanup * Generate swagger json * Merge branch 'master' of https://github.com/go-gitea/gitea into issue-due-date-api # Conflicts: # public/swagger.v1.json * Fixed permission to update a deadline via api * Re-added form to change a deadline * Added client-side validation + not ignore error messages from the api * Added locale for error message * Merge branch 'master' of https://github.com/go-gitea/gitea # Conflicts: # models/issue_comment.go * Proper date validation * Fixed indention * moved css to css file * added documentation for error codes * after merge cleanup * Added swagger description * DO NOTHING BUT TRIGGER THAT F*CKIN CI SO IT PICKS UP THE LATEST COMMIT AS IT SHOULD * DO NOTHING BUT TRIGGER THAT F*CKIN CI SO IT PICKS UP THE LATEST COMMIT AS IT SHOULD * regenerated stylesheets
This commit is contained in:
Vendored
+95
@@ -2320,6 +2320,68 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/issues/{index}/deadline": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"issue"
|
||||
],
|
||||
"summary": "Set an issue deadline. If set to null, the deadline is deleted.",
|
||||
"operationId": "issueEditIssueDeadline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "index of the issue to create or update a deadline on",
|
||||
"name": "index",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EditDeadlineOption"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"$ref": "#/responses/IssueDeadline"
|
||||
},
|
||||
"403": {
|
||||
"description": "Not repo writer",
|
||||
"schema": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Issue not found",
|
||||
"schema": {
|
||||
"$ref": "#/responses/empty"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/issues/{index}/labels": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -6145,6 +6207,21 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
|
||||
},
|
||||
"EditDeadlineOption": {
|
||||
"description": "EditDeadlineOption options for creating a deadline",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"due_date"
|
||||
],
|
||||
"properties": {
|
||||
"due_date": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"x-go-name": "Deadline"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
|
||||
},
|
||||
"EditHookOption": {
|
||||
"description": "EditHookOption options when modify one hook",
|
||||
"type": "object",
|
||||
@@ -6635,6 +6712,18 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
|
||||
},
|
||||
"IssueDeadline": {
|
||||
"description": "IssueDeadline represents an issue deadline",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"due_date": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"x-go-name": "Deadline"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
|
||||
},
|
||||
"IssueLabelsOption": {
|
||||
"description": "IssueLabelsOption a collection of labels",
|
||||
"type": "object",
|
||||
@@ -7635,6 +7724,12 @@
|
||||
"$ref": "#/definitions/Issue"
|
||||
}
|
||||
},
|
||||
"IssueDeadline": {
|
||||
"description": "IssueDeadline",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/IssueDeadline"
|
||||
}
|
||||
},
|
||||
"IssueList": {
|
||||
"description": "IssueList",
|
||||
"schema": {
|
||||
|
||||
Reference in New Issue
Block a user