forked from Qortal/q-blog
25 lines
862 B
Markdown
25 lines
862 B
Markdown
# Tracker Bootstrap — Troubleshooting (v4, 2025-08-17 00:53Z)
|
|
|
|
**Close duplicate milestone (keep lower ID):**
|
|
|
|
```bash
|
|
curl -X PATCH -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" "$GITEA_BASE_URL/api/v1/repos/$OWNER/$REPO/milestones/2" --data '{"state":"closed"}'
|
|
```
|
|
|
|
**List duplicate labels by name:**
|
|
|
|
```bash
|
|
curl -H "Authorization: token $GITEA_TOKEN" "$GITEA_BASE_URL/api/v1/repos/$OWNER/$REPO/labels" | jq 'group_by(.name) | map(select(length>1) | {name:.[0].name, ids: map(.id)})'
|
|
```
|
|
|
|
**Delete a duplicate label by ID:**
|
|
|
|
```bash
|
|
curl -X DELETE -H "Authorization: token $GITEA_TOKEN" "$GITEA_BASE_URL/api/v1/repos/$OWNER/$REPO/labels/<ID>"
|
|
```
|
|
|
|
**Re-run bootstrap safely:**
|
|
|
|
- Script skips existing labels by exact name.
|
|
- Issues are created **without labels** to avoid server 422; add labels via UI later if desired.
|