fix: use numeric IN_PROGRESS_LABEL_ID in DELETE calls (cleanup_labels and cleanup)

Review caught that cleanup_labels() and cleanup() still used the
string name 'in-progress' in DELETE /labels/ URL paths. Switched
both to use ${IN_PROGRESS_LABEL_ID} so label removal actually works
on abort/crash.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-20 14:45:03 +00:00
parent 613c6c12cb
commit def1ba7814

View file

@ -124,7 +124,7 @@ cleanup_worktree() {
cleanup_labels() {
curl -sf -X DELETE \
-H "Authorization: token ${CODEBERG_TOKEN}" \
"${API}/issues/${ISSUE}/labels/in-progress" >/dev/null 2>&1 || true
"${API}/issues/${ISSUE}/labels/${IN_PROGRESS_LABEL_ID}" >/dev/null 2>&1 || true
}
CLAIMED=false
@ -137,7 +137,7 @@ cleanup() {
log "cleanup: unclaiming issue (no PR created)"
curl -sf -X DELETE \
-H "Authorization: token ${CODEBERG_TOKEN}" \
"${API}/issues/${ISSUE}/labels/in-progress" >/dev/null 2>&1 || true
"${API}/issues/${ISSUE}/labels/${IN_PROGRESS_LABEL_ID}" >/dev/null 2>&1 || true
curl -sf -X POST \
-H "Authorization: token ${CODEBERG_TOKEN}" \
-H "Content-Type: application/json" \