mirror of
https://github.com/juanfont/headscale.git
synced 2026-05-07 03:11:00 +09:00
The scheduled job has failed every night since 2026-04-13. Two prior fixes (race-condition guards and splitting the combined where predicate in #3200) did not address the actual cause: `flatten` collapses nested records in a list-of-records pipeline, so after `gh api ... | from json | flatten` the `label` and `user` columns no longer exist - their fields are lifted to the top level (with prefix only on naming collisions). `where label.name == ...` and `where user.type != "Bot"` then both reference a column that is not there. `gh api --paginate` already returns a single concatenated JSON array, so `from json` produces a list of records directly and no flattening is needed. Drop both `| flatten` calls. Verified locally with nu 0.108 against the events stream of issue #3178: without flatten, `where event == "labeled" | where label.name == "needs-more-info" | last` returns the labeled event with its `label` record intact.