docs: ретраи curl для нестабильного соединения с API

Refs #1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 18:22:22 +03:00
co-authored by Claude Opus 5.5
parent 21eb8331d2
commit 47dd849528
+2
View File
@@ -8,6 +8,7 @@
set -a; . ./.env; set +a # SOURCECRAFT_TOKEN
R=https://api.sourcecraft.tech/repos/rogachevegorushka/tgit
H="Authorization: Bearer $SOURCECRAFT_TOKEN"
alias curl='curl --retry 4 --retry-all-errors --retry-delay 2'
J="Content-Type: application/json"
```
@@ -15,6 +16,7 @@ J="Content-Type: application/json"
## Подводные камни
- Соединение с `api.sourcecraft.tech` иногда рвётся (`curl: (35)`, пустой ответ) — отсюда `--retry`. Перед повторным POST проверить, не создалась ли сущность.
- `color` у метки — hex **без** `#` (`"ff7f0e"`), иначе `400 ValidationError`.
- Ответы-списки кладут элементы в разные ключи: `/issues` → `issues`, `/labels` репо → `items`, метки issue → `labels`.
- Issue адресуется номером (`issues/1`), метка — slug'ом (`size/0.5` → `size-0-5`).