gh pr checks *

built-in
94.0% Savings
2 Commands
221 Tokens saved
2 Tests

Install

tokf install e7b3d4a55b35bf47637e8d5fc863e2df29dc4817c73db465590d007d09c20f48
Safety checks passed

Filter definition

command = "gh pr checks *"
run = "gh pr checks {args} --json name,state,workflow"

[json]

[[json.extract]]
path = "$[*]"
as = "checks"

[[json.extract.fields]]
field = "name"
as = "name"

[[json.extract.fields]]
field = "state"
as = "state"

[[json.extract.fields]]
field = "workflow"
as = "workflow"

[on_success]
output = "all checks passed ({checks_count} checks)"

[on_failure]
output = "{checks | each: \"{state}  {name}  ({workflow})\" | join: \"\\n\"}"

Examples

all checks passed condenses to short message ~40 tokens → ~7 tokens (83% saved)
Raw output
[{"name":"ci/build","state":"SUCCESS","workflow":"CI"},{"name":"ci/test","state":"SUCCESS","workflow":"CI"},{"name":"lint","state":"SUCCESS","workflow":"Lint"}]
Filtered output
all checks passed (3 checks)
failing checks shows all check states ~40 tokens → ~17 tokens (57% saved)
Raw output
[{"name":"ci/build","state":"SUCCESS","workflow":"CI"},{"name":"ci/test","state":"FAILURE","workflow":"CI"},{"name":"lint","state":"SUCCESS","workflow":"Lint"}]
Filtered output
SUCCESS  ci/build  (CI)
FAILURE  ci/test  (CI)
SUCCESS  lint  (Lint)
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters