Update a milestone
PATCH
/repos/{owner}/{repo}/milestones/{milestone_number}
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” owner
required
string
The account owner of the repository. The name is not case sensitive.
repo
required
string
The name of the repository without the .git extension. The name is not case sensitive.
milestone_number
required
integer
The number that identifies the milestone.
Request Body
Section titled “ Request Body ” Media type application/json
object
title
The title of the milestone.
string
state
The state of the milestone. Either open or closed.
string
description
A description of the milestone.
string
due_on
The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
string format: date-time
Examples
Example default
{ "title": "v1.0", "state": "open", "description": "Tracking milestone for version 1.0", "due_on": "2012-10-09T23:39:01Z"}Responses
Section titled “ Responses ”Response
Media type application/json
Milestone
A collection of related issues and pull requests.
object
url
required
string format: uri
html_url
required
string format: uri
labels_url
required
string format: uri
id
required
integer
node_id
required
string
number
required
The number of the milestone.
integer
state
required
The state of the milestone.
string
title
required
The title of the milestone.
string
description
required
string
creator
required
Simple User
A GitHub user.
object
name
string
email
string
login
required
string
id
required
integer format: int64
node_id
required
string
avatar_url
required
string format: uri
gravatar_id
required
string
url
required
string format: uri
html_url
required
string format: uri
followers_url
required
string format: uri
following_url
required
string
gists_url
required
string
starred_url
required
string
subscriptions_url
required
string format: uri
organizations_url
required
string format: uri
repos_url
required
string format: uri
events_url
required
string
received_events_url
required
string format: uri
type
required
string
site_admin
required
boolean
starred_at
string
user_view_type
string
open_issues
required
integer
closed_issues
required
integer
created_at
required
string format: date-time
updated_at
required
string format: date-time
closed_at
required
string format: date-time
due_on
required
string format: date-time
Examples
Example default
{ "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", "id": 1002604, "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", "number": 1, "state": "open", "title": "v1.0", "description": "Tracking milestone for version 1.0", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "open_issues": 4, "closed_issues": 8, "created_at": "2011-04-10T20:09:31Z", "updated_at": "2014-03-03T18:58:10Z", "closed_at": "2013-02-12T13:22:01Z", "due_on": "2012-10-09T23:39:01Z"}