Merge pull request 'fix: too_large branch still uses string label '"underspecified"' (#213)' (#362) from fix/issue-213 into main
Reviewed-on: https://codeberg.org/johba/disinto/pulls/362 Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
This commit is contained in:
commit
06f8e3fcba
2 changed files with 10 additions and 2 deletions
|
|
@ -20,6 +20,11 @@ export PROJECT_TOML="${1:-}"
|
||||||
source "$(dirname "$0")/../lib/env.sh"
|
source "$(dirname "$0")/../lib/env.sh"
|
||||||
source "$(dirname "$0")/../lib/ci-helpers.sh"
|
source "$(dirname "$0")/../lib/ci-helpers.sh"
|
||||||
|
|
||||||
|
# Gitea labels API requires []int64 — look up the "underspecified" label ID once
|
||||||
|
UNDERSPECIFIED_LABEL_ID=$(codeberg_api GET "/labels" 2>/dev/null \
|
||||||
|
| jq -r '.[] | select(.name == "underspecified") | .id' 2>/dev/null || true)
|
||||||
|
UNDERSPECIFIED_LABEL_ID="${UNDERSPECIFIED_LABEL_ID:-1300816}"
|
||||||
|
|
||||||
# Track CI fix attempts per PR to avoid infinite respawn loops
|
# Track CI fix attempts per PR to avoid infinite respawn loops
|
||||||
CI_FIX_TRACKER="${FACTORY_ROOT}/dev/ci-fixes-${PROJECT_NAME:-harb}.json"
|
CI_FIX_TRACKER="${FACTORY_ROOT}/dev/ci-fixes-${PROJECT_NAME:-harb}.json"
|
||||||
CI_FIX_LOCK="${CI_FIX_TRACKER}.lock"
|
CI_FIX_LOCK="${CI_FIX_TRACKER}.lock"
|
||||||
|
|
@ -606,7 +611,7 @@ if [ -f "$PREFLIGHT_RESULT" ]; then
|
||||||
curl -sf -X POST -H "Authorization: token ${CODEBERG_TOKEN}" \
|
curl -sf -X POST -H "Authorization: token ${CODEBERG_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"${API}/issues/${READY_ISSUE}/labels" \
|
"${API}/issues/${READY_ISSUE}/labels" \
|
||||||
-d '{"labels":["underspecified"]}' >/dev/null 2>&1 || true
|
-d "{\"labels\":[${UNDERSPECIFIED_LABEL_ID}]}" >/dev/null 2>&1 || true
|
||||||
;;
|
;;
|
||||||
already_done)
|
already_done)
|
||||||
log "#${READY_ISSUE} already done"
|
log "#${READY_ISSUE} already done"
|
||||||
|
|
|
||||||
|
|
@ -512,6 +512,9 @@ Instructions:
|
||||||
BACKLOG_LABEL_ID=$(codeberg_api GET "/labels" 2>/dev/null \
|
BACKLOG_LABEL_ID=$(codeberg_api GET "/labels" 2>/dev/null \
|
||||||
| jq -r '.[] | select(.name == "backlog") | .id' 2>/dev/null || true)
|
| jq -r '.[] | select(.name == "backlog") | .id' 2>/dev/null || true)
|
||||||
BACKLOG_LABEL_ID="${BACKLOG_LABEL_ID:-1300815}"
|
BACKLOG_LABEL_ID="${BACKLOG_LABEL_ID:-1300815}"
|
||||||
|
UNDERSPECIFIED_LABEL_ID=$(codeberg_api GET "/labels" 2>/dev/null \
|
||||||
|
| jq -r '.[] | select(.name == "underspecified") | .id' 2>/dev/null || true)
|
||||||
|
UNDERSPECIFIED_LABEL_ID="${UNDERSPECIFIED_LABEL_ID:-1300816}"
|
||||||
|
|
||||||
# Check if this is a refusal (Claude wrote refusal JSON to IMPL_SUMMARY_FILE)
|
# Check if this is a refusal (Claude wrote refusal JSON to IMPL_SUMMARY_FILE)
|
||||||
REFUSAL_JSON=""
|
REFUSAL_JSON=""
|
||||||
|
|
@ -561,7 +564,7 @@ A maintainer should split this issue or add more detail to the spec."
|
||||||
-H "Authorization: token ${CODEBERG_TOKEN}" \
|
-H "Authorization: token ${CODEBERG_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"${API}/issues/${ISSUE}/labels" \
|
"${API}/issues/${ISSUE}/labels" \
|
||||||
-d '{"labels":["underspecified"]}' >/dev/null 2>&1 || true
|
-d "{\"labels\":[${UNDERSPECIFIED_LABEL_ID}]}" >/dev/null 2>&1 || true
|
||||||
curl -sf -X DELETE \
|
curl -sf -X DELETE \
|
||||||
-H "Authorization: token ${CODEBERG_TOKEN}" \
|
-H "Authorization: token ${CODEBERG_TOKEN}" \
|
||||||
"${API}/issues/${ISSUE}/labels/backlog" >/dev/null 2>&1 || true
|
"${API}/issues/${ISSUE}/labels/backlog" >/dev/null 2>&1 || true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue