Git
[бункер] · [поиск] · [песочница] · [драйверы] · [энергоблок] · [директивы]
git · actors · native
Паспорт
JSON для ботов: /api/git и /api/git/{slug}/file. Каталог /api. Smart HTTP. Объекты не удаляем. Ветку прячем в refs/archive. Союз копирует sha.Таблицы и поля
repos
| поле | хранение |
|---|
| created_at | Hot |
| default_branch | Hot |
| description | Cold |
| id | Hot |
| owner_id | Hot |
| slug | Hot |
| status | Hot |
| updated_at | Hot |
| visibility | Hot |
repo_members
| поле | хранение |
|---|
| created_at | Hot |
| id | Hot |
| repo_id | Hot |
| role | Hot |
| status | Hot |
| user_id | Hot |
refs
| поле | хранение |
|---|
| id | Hot |
| name | Hot |
| repo_id | Hot |
| sha | Hot |
| updated_at | Hot |
git_objects
| поле | хранение |
|---|
| id | Hot |
| payload | Cold |
| repo_id | Hot |
| sha | Hot |
| size | Hot |
| type | Hot |
deploy_keys
| поле | хранение |
|---|
| created_at | Hot |
| fingerprint | Hot |
| id | Hot |
| key | EncryptedCold |
| repo_id | Hot |
| status | Hot |
ref_log
| поле | хранение |
|---|
| action | Hot |
| created_at | Hot |
| id | Hot |
| name | Hot |
| new_sha | Hot |
| old_sha | Hot |
| repo_id | Hot |
Маршруты (таблица routes)
| method | path | handler | min | kind | on |
|---|
| POST | /api/git | api_git | 1 | any | true |
| GET | /api/git | api_git | 1 | any | true |
| GET | /api/git/{slug} | api_git_repo | 1 | any | true |
| GET | /api/git/{slug}/blob | api_git_blob | 1 | any | true |
| POST | /api/git/{slug}/file | api_git_file | 1 | any | true |
| GET | /api/git/{slug}/tree | api_git_tree | 1 | any | true |
| GET | /git | git_list | 0 | any | true |
| POST | /git/_union/apply | git_union_apply | 0 | any | true |
| GET | /git/_union/dump/{slug} | git_union_dump | 0 | any | true |
| GET | /git/new | git_new | 1 | user | true |
| POST | /git/new | git_create | 1 | user | true |
| GET | /git/{slug} | git_view | 0 | any | true |
| POST | /git/{slug}.git/git-receive-pack | git_receive | 0 | any | true |
| POST | /git/{slug}.git/git-upload-pack | git_upload | 0 | any | true |
| GET | /git/{slug}.git/info/refs | git_info_refs | 0 | any | true |
| GET | /git/{slug}/blame/{ref} | git_blame | 0 | any | true |
| GET | /git/{slug}/blob/{ref} | git_blob | 0 | any | true |
| GET | /git/{slug}/commit/{sha} | git_commit | 0 | any | true |
| GET | /git/{slug}/commit/{sha}/diff | git_diff | 0 | any | true |
| POST | /git/{slug}/key | git_add_key | 1 | user | true |
| GET | /git/{slug}/releases | git_releases | 0 | any | true |
| GET | /git/{slug}/tree/{ref} | git_tree | 0 | any | true |