跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!

Create a milestone

POST
/repos/{owner}/{repo}/milestones
curl --request POST \
--url https://gitea.com/api/v1/repos/example/example/milestones \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "description": "example", "due_on": "2026-04-15T12:00:00Z", "state": "open", "title": "example" }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

Media typeapplication/json

CreateMilestoneOption options for creating a milestone

object
description

Description provides details about the milestone

string
due_on
string format: date-time
state
string
Allowed values: open closed
title

Title is the title of the new milestone

string

Milestone

Media typeapplication/json

Milestone milestone is a collection of issues on one repository

object
closed_at
string format: date-time
closed_issues

ClosedIssues is the number of closed issues in this milestone

integer format: int64
created_at
string format: date-time
description

Description provides details about the milestone

string
due_on
string format: date-time
id

ID is the unique identifier for the milestone

integer format: int64
open_issues

OpenIssues is the number of open issues in this milestone

integer format: int64
state

State indicates if the milestone is open or closed open StateOpen pr is opened closed StateClosed pr is closed

string
Allowed values: open closed
title

Title is the title of the milestone

string
updated_at
string format: date-time
Example
{
"state": "open"
}

APINotFound is a not found empty response

Media typeapplication/json