improvement

This commit is contained in:
Lunny Xiao
2026-04-03 11:23:31 -07:00
committed by beardev-in
parent e0c53b3ba8
commit 3557c100c2
2 changed files with 63 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ func getRepoProjectByID(ctx *context.APIContext) *project_model.Project {
}
return nil
}
project.Repo = ctx.Repo.Repository
return project
}
@@ -713,9 +714,9 @@ func AddIssueToProjectColumn(ctx *context.APIContext) {
// RemoveIssueFromProjectColumn remove an issue from a project column
func RemoveIssueFromProjectColumn(ctx *context.APIContext) {
// swagger:operation POST /repos/{owner}/{repo}/projects/columns/{id}/issues/{issue_id} repository repoAddIssueToProjectColumn
// swagger:operation DELETE /repos/{owner}/{repo}/projects/columns/{id}/issues/{issue_id} repository repoRemoveIssueFromProjectColumn
// ---
// summary: Add an issue to a project column
// summary: Remove an issue from a project column
// consumes:
// - application/json
// produces:
@@ -744,7 +745,7 @@ func RemoveIssueFromProjectColumn(ctx *context.APIContext) {
// format: int64
// required: true
// responses:
// "201":
// "204":
// "$ref": "#/responses/empty"
// "403":
// "$ref": "#/responses/forbidden"

View File

@@ -13843,6 +13843,65 @@
"$ref": "#/responses/validationError"
}
}
},
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repository"
],
"summary": "Remove an issue from a project column",
"operationId": "repoRemoveIssueFromProjectColumn",
"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",
"format": "int64",
"description": "id of the column",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "id of the issue",
"name": "issue_id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/empty"
},
"403": {
"$ref": "#/responses/forbidden"
},
"404": {
"$ref": "#/responses/notFound"
},
"422": {
"$ref": "#/responses/validationError"
}
}
}
},
"/repos/{owner}/{repo}/projects/{id}": {