- Identify/acquire a valid GitHub Personal Access Token (PAT)
- Set
GITHUB_USER
andGITHUB_API_TOKEN
e.g. via the following snippet
GITHUB_USER=<username>
GITHUB_API_TOKEN=<PAT goes here>
export GITHUB_USER GITHUB_API_TOKEN
All :var
placeholders must be replaced with appropriate values.
curl -u "$GITHUB_USER:$GITHUB_API_TOKEN" \
-H 'Content-type: text/json' \
-X POST \
-d '{"title":"1611","description":"Milestone 1611","due_on":"2016-09-14T12:00:00Z"}' \
https://api.github.com/repos/:org/:repo/milestones
Updates the state
to closed
curl -u "$GITHUB_USER:$GITHUB_API_TOKEN" \
-H 'Content-type: text/json' \
-X PATCH \
-d '{"title":"1611","state":"closed"}' \
https://api.github.com/repos/:org/:repo/milestones