fix: use Forgejo integer CommentType (7) instead of string "label" in timeline query
Forgejo's timeline API serializes CommentType as an integer enum, not a string. CommentTypeLabel is 7. The previous .type == "label" filter never matched, making the grace period a no-op. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8679332756
commit
96aeb549c0
1 changed files with 4 additions and 2 deletions
|
|
@ -114,10 +114,12 @@ in_progress_recently_added() {
|
|||
|
||||
now=$(date +%s)
|
||||
|
||||
# Query issue timeline for the most recent in-progress label event
|
||||
# Query issue timeline for the most recent in-progress label event.
|
||||
# Forgejo serializes CommentType as an integer, not a string —
|
||||
# CommentTypeLabel is 7 in the Gitea/Forgejo enum.
|
||||
label_ts=$(curl -sf -H "Authorization: token ${FORGE_TOKEN}" \
|
||||
"${API}/issues/${issue}/timeline" | \
|
||||
jq -r '[.[] | select(.type == "label") | select(.label.name == "in-progress")] | last | .created_at // empty') || true
|
||||
jq -r '[.[] | select(.type == 7) | select(.label.name == "in-progress")] | last | .created_at // empty') || true
|
||||
|
||||
if [ -z "$label_ts" ]; then
|
||||
return 1 # no label event found — not recently added
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue