跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
This is the documentation of the next version, still under development. See the latest release.

Edit a project workflow

PATCH
/user/projects/{id}/workflows/{workflow_id}
curl --request PATCH \
--url https://gitea.com/api/v1/user/projects/1/workflows/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "actions": { "add_label_ids": [ 1 ], "column_id": 1, "issue_state": "example", "remove_label_ids": [ 1 ] }, "enabled": true, "filters": { "issue_type": "example", "label_ids": [ 1 ], "source_column_id": 1, "target_column_id": 1 } }'
id
required
integer format: int64

Id of the project

workflow_id
required
integer format: int64

Id of the workflow

Media typeapplication/json
EditProjectWorkflowOption

Options for editing a project workflow, omitted fields are left unchanged

object
actions
ProjectWorkflowActions

Describes what a project workflow does to a matching item

object
add_label_ids
Array<integer>
column_id
integer format: int64
issue_state

“close” or “reopen”

string
remove_label_ids
Array<integer>
enabled
boolean
filters
ProjectWorkflowFilters

Restricts which items a project workflow runs for

object
issue_type

“issue” or “pull_request”, empty matches both

string
label_ids

The item must have all of these labels

Array<integer>
source_column_id

Only for item_column_changed

integer format: int64
target_column_id

Only for item_column_changed

integer format: int64

Example generated

{
"actions": {
"add_label_ids": [
1
],
"column_id": 1,
"issue_state": "example",
"remove_label_ids": [
1
]
},
"enabled": true,
"filters": {
"issue_type": "example",
"label_ids": [
1
],
"source_column_id": 1,
"target_column_id": 1
}
}

ProjectWorkflow

Media typeapplication/json
ProjectWorkflow

Represents a project workflow

object
actions
ProjectWorkflowActions

Describes what a project workflow does to a matching item

object
add_label_ids
Array<integer>
column_id
integer format: int64
issue_state

“close” or “reopen”

string
remove_label_ids
Array<integer>
created_at
string format: date-time
enabled
boolean
event

One of item_added_to_project, item_removed_from_project, item_reopened, item_closed, item_column_changed, code_changes_requested, code_review_approved, pull_request_merged

string
filters
ProjectWorkflowFilters

Restricts which items a project workflow runs for

object
issue_type

“issue” or “pull_request”, empty matches both

string
label_ids

The item must have all of these labels

Array<integer>
source_column_id

Only for item_column_changed

integer format: int64
target_column_id

Only for item_column_changed

integer format: int64
id
integer format: int64
updated_at
string format: date-time

Example generated

{
"actions": {
"add_label_ids": [
1
],
"column_id": 1,
"issue_state": "example",
"remove_label_ids": [
1
]
},
"created_at": "2026-04-15T12:00:00Z",
"enabled": true,
"event": "example",
"filters": {
"issue_type": "example",
"label_ids": [
1
],
"source_column_id": 1,
"target_column_id": 1
},
"id": 1,
"updated_at": "2026-04-15T12:00:00Z"
}

APIForbiddenError is a forbidden error response

message
string
url
string

APINotFound is a not found empty response

APIValidationError is error format response related to input validation

message
string
url
string