mirror of
https://github.com/juanfont/headscale.git
synced 2026-05-05 12:06:10 +02:00
github: split nu where in needs-more-info timer
GitHub's /issues/:n/events endpoint returns a mixed-schema table.
Only labeled/unlabeled rows carry a `label` column. Nu's `where`
does not short-circuit on missing columns, so the combined
predicate `event == "labeled" and label.name == ...` dereferenced
`label.name` on every row and crashed on the first non-labeled
event with `nu:🐚:column_not_found`.
The scheduled job has failed every night since 2026-04-13 (the
first run with a labeled issue), so no `needs-more-info` issue
has been auto-closed.
Split into two sequential `where` filters so `label.name` is only
accessed on rows that have the column.
This commit is contained in:
parent
4e1d83ecef
commit
ce5d1ba8f8
3
.github/workflows/needs-more-info-timer.yml
vendored
3
.github/workflows/needs-more-info-timer.yml
vendored
@ -60,7 +60,8 @@ jobs:
|
||||
let events = (gh api $"repos/($env.GH_REPO)/issues/($number)/events"
|
||||
--paginate | from json | flatten)
|
||||
let label_event = ($events
|
||||
| where event == "labeled" and label.name == "needs-more-info"
|
||||
| where event == "labeled"
|
||||
| where label.name == "needs-more-info"
|
||||
| last)
|
||||
let label_added_at = ($label_event.created_at | into datetime)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user