3.1 KiB
3.1 KiB
Issues API reference
Base: https://git.mpm.to/api/v1
List issues for a repository
curl -s -H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/issues?type=issues&state=open&limit=50&page=1"
Query params:
state:open|closed|all(default:open)type:issues|pulls(useissuesto exclude PRs)labels: comma-separated label names to filterassignee: filter by usernamemilestone: milestone IDq: search keyword
Key response fields per issue: number, title, body, state, user.login, assignees, labels, milestone, created_at, updated_at, html_url.
Get a single issue
curl -s -H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/issues/{index}"
Create an issue
curl -s -X POST \
-H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
-H "Content-Type: application/json" \
-d '{
"title": "Issue title",
"body": "Issue description (markdown supported)",
"assignees": ["username1"],
"labels": [123],
"milestone": 1
}' \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/issues"
Note: labels takes an array of label IDs (integers), not names. Fetch label IDs first if needed:
curl -s -H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/labels"
Update an issue (edit title, body, state, assignees)
curl -s -X PATCH \
-H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated title",
"body": "Updated body",
"state": "closed"
}' \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/issues/{index}"
Use "state": "closed" to close an issue, "state": "open" to reopen.
Add a comment to an issue
curl -s -X POST \
-H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
-H "Content-Type: application/json" \
-d '{"body": "Comment text (markdown supported)"}' \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/issues/{index}/comments"
List comments on an issue
curl -s -H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/issues/{index}/comments"
Add labels to an issue
curl -s -X POST \
-H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
-H "Content-Type: application/json" \
-d '{"labels": [123, 456]}' \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/issues/{index}/labels"
List all labels for a repo
curl -s -H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
"https://git.mpm.to/api/v1/repos/{owner}/{repo}/labels"
List issues across all repos (authenticated user)
curl -s -H "Authorization: token e82a7235b948fbbeea60329422fcac89fa5a5ce8" \
"https://git.mpm.to/api/v1/repos/issues/search?state=open&type=comment&limit=50"