2026-08-05 12:00:14 -06:00
|
|
|
# REST check runs do not expose per-attempt creation time. The endpoint is
|
|
|
|
|
# intentionally queried with filter=latest; select the highest immutable run ID
|
|
|
|
|
# for the trusted producer and require that returned attempt to have completed
|
|
|
|
|
# successfully by merge. Any ordinary post-merge rerun therefore fails closed
|
|
|
|
|
# and needs operator inspection. DCO alone has a bounded five-minute exception.
|
2026-07-30 12:27:56 -06:00
|
|
|
[
|
|
|
|
|
.[].check_runs[]
|
2026-08-05 12:00:14 -06:00
|
|
|
| select(.name == $name and .app.id == $integration_id)
|
2026-07-30 12:27:56 -06:00
|
|
|
]
|
2026-08-05 12:00:14 -06:00
|
|
|
| sort_by(.id)
|
2026-07-30 12:27:56 -06:00
|
|
|
| last
|
2026-08-05 12:00:14 -06:00
|
|
|
| select((.completed_at // null) != null)
|
|
|
|
|
| select(
|
|
|
|
|
(.completed_at | fromdateiso8601)
|
|
|
|
|
<= (
|
|
|
|
|
($merged_at | fromdateiso8601)
|
|
|
|
|
+ (if $name == "DCO Check" then 300 else 0 end)
|
|
|
|
|
)
|
|
|
|
|
)
|
2026-07-30 12:27:56 -06:00
|
|
|
| .status == "completed"
|
|
|
|
|
and (
|
|
|
|
|
.conclusion == "success"
|
|
|
|
|
or .conclusion == "skipped"
|
|
|
|
|
or .conclusion == "neutral"
|
|
|
|
|
)
|