Skip to content

ci: claim the Context7 library and refresh it - #84

Merged
cardmagic merged 2 commits into
mainfrom
chore/context7-claim
Oct 8, 2026
Merged

cardmagic merged 2 commits into
mainfrom
chore/context7-claim

Conversation

@cardmagic

Copy link
Copy Markdown
Owner

Why

Context7 indexed this repository on October 8, 2026, as part of the agent discoverability plan (R4). Claiming the library unlocks its admin panel and higher refresh limits. Context7 verifies a claim through the url and public_key fields in context7.json. The public_key is the maintainer's public account key, and Context7 designs it to be committed.

What changes

  • context7.json adds url and public_key. The other fields do not change.
  • .github/workflows/context7-refresh.yml asks Context7 to refresh the index after each push to main that changes the README, context7.json, docs/, or examples/. It reads the CONTEXT7_API_KEY repository secret, which is set. It uses no third-party action, and it runs with contents: read.
  • The release docs now say to confirm the workflow run instead of refreshing by hand.

Validation

  • actionlint passes on the new workflow.
  • The workflow's run: script, run locally with the same key, returned {"message":"Refresh started successfully"}.
  • context7.json parses, and the new fields come before projectTitle.

After merge, the maintainer clicks Claim Library on the Context7 admin page to finish the claim.

Context7 indexed this repository on October 8, 2026. A claimed library
has an admin panel and higher refresh limits, and Context7 verifies
the claim through the url and public_key in context7.json. The
public_key is the maintainer's public account key, which Context7
designs to be committed.

Add a workflow that asks Context7 to refresh the index after each push
to main that changes the README, context7.json, docs/, or examples/.
The release docs no longer ask for a manual refresh. The workflow's
request was run locally against the API and returned "Refresh started
successfully". It reads the CONTEXT7_API_KEY repository secret, which
is set.
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Adds a CI workflow that calls an external service with a secret.

The PR appears safe to merge; no blocking issue was found.

What we checked:

  • Other HTTP errors still fail: Only HTTP 200 and the recorded HTTP 400 cooldown answer exit successfully. All other HTTP answers print an error and exit with failure.

Summary

This PR adds the Context7 claim fields and a workflow that requests an index refresh after documentation pushes to main.

  • The latest commit raises the request limit to 180 seconds and prints the response.
  • The recorded too-early response now produces a notice instead of a failed run.
  • Other HTTP failures still fail the job.
  • Release instructions now ask maintainers to confirm the workflow run.

No new actionable issues were found.

Reviews (2) · Last reviewed commit: "ci: treat a too-early Context7 refresh a..." · Reviewed by Greptile

The first run of the refresh workflow failed. curl timed out after 60
seconds with no response, and later calls returned HTTP 400
{"error":"too-early","message":"... Minimum 10 days required between
updates."}. Context7 limits how often one library refreshes, so the
workflow failed on most pushes to main.

Allow 180 seconds for the response, print the body, and end with a
workflow notice when Context7 answers too-early. Any other non-200
answer still fails the job. Against the live API, the old script
exited 56 on the too-early answer and the new script exits 0 with the
notice.
@cardmagic

Copy link
Copy Markdown
Owner Author

@greptileai Please review the latest commit 8ef3856. The first refresh run on solid-objects-js main timed out, and later calls returned HTTP 400 too-early (Context7 allows one refresh every 10 days). The workflow now allows 180 seconds, prints the body, ends with a notice on too-early, and still fails on any other non-200 answer. Against the live API the old script exited 56 and the new one exits 0.

@cardmagic
cardmagic merged commit 787e672 into main Oct 8, 2026
43 checks passed
@cardmagic
cardmagic deleted the chore/context7-claim branch October 8, 2026 07:53
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