Skip to content

ci: read the Context7 error field with jq - #85

Merged
cardmagic merged 1 commit into
mainfrom
fix/context7-refresh-json
Oct 8, 2026
Merged

cardmagic merged 1 commit into
mainfrom
fix/context7-refresh-json

Conversation

@cardmagic

Copy link
Copy Markdown
Owner

Same fix as the review feedback on cardmagic/solid-objects-js#65. The too-early check in the Context7 refresh workflow matched the exact string "error":"too-early", so valid JSON with other spacing would fail the job instead of skipping. The workflow now reads the field with jq -e '.error == "too-early"'.

Validation

  • actionlint passes.
  • On four sample bodies, grep missed {"error": "too-early"} and jq skipped it. Both still fail on another error and on a body that is not JSON.
  • Against the live API, the workflow script exits 0 with the notice.

Same fix as review feedback on solid-objects-js#65. The too-early check matched
the exact string "error":"too-early", so valid JSON with other
spacing, such as {"error": "too-early"}, would fail the job instead
of skipping. Read the field with jq. On four sample bodies, grep
missed the spaced form and jq skipped it, and both still fail on
another error and on a body that is not JSON. Against the live API
the workflow script still exits 0 with the notice.
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Workflow script uses a different tool to parse JSON.

The PR appears safe to merge.

What we checked:

  • Other errors still fail: The skip requires HTTP 400 and an error value equal to "too-early". A different value or invalid JSON leaves the job on its failure path.

Summary

The workflow now reads the Context7 error field with jq instead of matching exact text.

  • HTTP 400 responses with "error": "too-early" skip successfully, regardless of JSON spacing.
  • Other errors still fail the job.
  • No actionable issues found.

Reviews (1) · Last reviewed commit: "ci: read the Context7 error field with j..." · Reviewed by Greptile

@cardmagic
cardmagic merged commit b70cf41 into main Oct 8, 2026
43 checks passed
@cardmagic
cardmagic deleted the fix/context7-refresh-json branch October 8, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant