Skip to main content
PATCH
/
repos
/
{owner}
/
{repo}
/
milestones
/
{id}
Edit a milestone
curl --request PATCH \
  --url https://gogs.example.com/api/v1/repos/{owner}/{repo}/milestones/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "due_on": "2023-11-07T05:31:56Z",
  "state": "open"
}
'
{
  "id": 123,
  "state": "open",
  "title": "<string>",
  "description": "<string>",
  "open_issues": 123,
  "closed_issues": 123,
  "closed_at": "2023-11-07T05:31:56Z",
  "due_on": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Personal access token. Use format: token {YOUR_ACCESS_TOKEN}

Path Parameters

owner
string
required

Repository owner

repo
string
required

Repository name

id
string
required

Milestone ID

Body

application/json
title
string
description
string
due_on
string<date-time>
state
enum<string>
Available options:
open,
closed

Response

Success

id
integer
state
enum<string>
Available options:
open,
closed
title
string
description
string
open_issues
integer
closed_issues
integer
closed_at
string<date-time> | null
due_on
string<date-time> | null