6. GET /user/repos
— получить список репозиториев текущего пользователя
Описание
Возвращает все репозитории, доступные пользователю (личные и организации).
Пример запроса:
curl -X GET https://api.gitverse.ru/user/repos \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/vnd.gitverse+json;version=1"
Ответ (200 OK
):
[
{
"id": 143,
"name": "APInewTestRepo4.3",
"full_name": "dlborun/APInewTestRepo4.3",
"private": false,
"description": "This is a test repository with all options",
"fork": false,
"default_branch": "main",
"visibility": "public",
"owner": {
"login": "dlborun",
"id": 1,
"email": "new1@example.com"
},
"stargazers_count": 0,
"watchers": 1,
"size": 27,
"pushed_at": "2025-06-10T11:04:06Z",
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"allow_merge_commit": true,
"allow_squash_merge": true,
"allow_rebase_merge": true,
"permissions": {
"pull": true,
"push": false,
"admin": false
}
}
]
Поле | Описание |
---|---|
name | Название репозитория |
description | Описание |
private | Приватность |
visibility | Видимость: public/private/internal |
permissions.pull/push/admin | Права пользователя |
allow_merge_commit , allow_squash_merge и др. | Настройки слияния Pull Request'ов |