Skip to content

A repository's milestones: open ones soonest due first (those without a due date after), then closed ones, most recently closed first.

GET/repos/{owner}/{name}/milestones

Each has its number, title, description, due_on (YYYY-MM-DD), state, and open_items and closed_items: its issues and pull requests, a merged pull request counting as closed.

Open milestones soonest due first, then closed ones. Progress is closed_items out of open_items plus closed_items.

  • Authentication: Optional. Public data can be read without a token; send one to see what is private.
  • MCP tool: repository with action list_milestones, and the same inputs
  • Scope: An access token needs repo:read.
Name Type Required Description
owner string Yes The workspace that owns the repository.
name string Yes The repository’s name.
Name Type Required Description
state string No One of open, closed.
curl https://api.g1t.sh/repos/flagon-io/hello/milestones \
-H "Authorization: Bearer $G1T_TOKEN"

A successful request answers 200 with:

[
{
"number": 3,
"title": "Launch",
"description": "Everything that has to land before the launch on October 14.",
"due_on": "2026-10-14",
"state": "open",
"open_items": 5,
"closed_items": 12,
"created_at": "2026-09-20T09:00:00.000Z",
"updated_at": "2026-10-06T16:12:40.118Z",
"closed_at": null
}
]

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
422 invalid The input is not valid. message says which field and why.