fix: bug: in_progress_recently_added grace period broken — filters timeline by type==7 but Forgejo API returns type as string "label" (#565)
This commit is contained in:
parent
d29a19612e
commit
6df0476808
1 changed files with 2 additions and 3 deletions
|
|
@ -115,11 +115,10 @@ in_progress_recently_added() {
|
|||
now=$(date +%s)
|
||||
|
||||
# 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.
|
||||
# Forgejo 11.x API returns type as string "label", not integer 7.
|
||||
label_ts=$(curl -sf -H "Authorization: token ${FORGE_TOKEN}" \
|
||||
"${API}/issues/${issue}/timeline" | \
|
||||
jq -r '[.[] | select(.type == 7) | select(.label.name == "in-progress")] | last | .created_at // empty') || true
|
||||
jq -r '[.[] | select(.type == "label") | 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