Skip to content

ci: refresh Context7 after a Release Please release - #40

Merged
uniskela merged 3 commits into
mainfrom
ci/context7-refresh-20261008
Oct 8, 2026
Merged

uniskela merged 3 commits into
mainfrom
ci/context7-refresh-20261008

Conversation

@uniskela

@uniskela uniskela commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add .github/workflows/context7-refresh.yml as a reusable and manually runnable workflow.
  • Wire .github/workflows/release-please.yml to request a Context7 refresh only when Release Please reports release_created == 'true'. Ordinary pushes, docs-only merges, and release PR updates do not trigger an automatic refresh.
  • Preserve workflow_dispatch so maintainers can manually update documentation between releases.
  • Use the official Context7 POST /api/v1/refresh endpoint with library ID /uniskela/stack-manager, read-only repository permissions, and an explicitly passed Context7 API key (not secrets: inherit).

Required setup

  1. Confirm that /uniskela/stack-manager has finished indexing on Context7 and is the correct library ID.
  2. Create the CONTEXT7_API_KEY repository Actions secret at Settings → Secrets and variables → Actions.
  3. After merging, use Actions → Refresh Context7 Documentation → Run workflow to test authentication, then let future published releases trigger it automatically.

Validation

  • Read back and verified both workflow files directly from the PR branch.
  • Confirmed existing release jobs and the release_created condition are retained.
  • Cannot perform a live authenticated refresh before the secret is configured.

Reference: https://context7.com/docs/integrations/github-actions

Summary by CodeRabbit

  • Chores
    • Context7 references are refreshed automatically after a release is created, so the latest released project information can become available without a separate manual refresh.
    • The refresh can also be triggered manually.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 443684ca-56fb-475e-a827-e995afde1e61
📥 Commits

Reviewing files that changed from the base of the PR and between f09ddf9 and ee843fd.

📒 Files selected for processing (2)
  • .github/workflows/context7-refresh.yml
  • .github/workflows/release-please.yml

Limit details: You’ve used all 10 included reviews currently available.


📝 Walkthrough

Walkthrough

Adds a reusable GitHub Actions workflow that sends a refresh request to Context7. The workflow can run manually or after a release is created.

Changes

Context7 refresh

Layer / File(s) Summary
Refresh workflow and request
.github/workflows/context7-refresh.yml
Defines callable and manual triggers. Checks for an empty CONTEXT7_API_KEY, then sends the repository name to Context7 with bearer authentication, retries, and timeouts.
Release workflow integration
.github/workflows/release-please.yml
Runs the refresh workflow only when release-please reports that a release was created. Passes the Context7 API key to the reusable workflow.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ReleasePlease
  participant Context7RefreshWorkflow
  participant Context7
  ReleasePlease->>Context7RefreshWorkflow: Invoke after release_created is true
  Context7RefreshWorkflow->>Context7: POST repository name with bearer authentication
Loading

Merge Risk: ⚪ Minimal · up to ee843

The refresh is configured for manual use and release creation, and HTTP failures are surfaced. No material merge risk is established.

Architecture Summary

Architecture risk: 🔵 Low · up to ee843

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/workflows/context7-refresh.yml: Adds the Context7 refresh workflow, including callable and manual triggers, a required API-key input for workflow calls, and a read-only permission. The job rejects an empty key; otherwise, it sends the repository name to the refresh endpoint with bearer authentication and configured retries and timeouts.
  • observed — Modified behavior in .github/workflows/release-please.yml: Adds a Context7 refresh job that runs only when release-please reports release_created == 'true'. It calls the Context7 refresh reusable workflow with read-only contents permission and passes the Context7 API key.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: refreshing Context7 after a Release Please release through CI workflows.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@uniskela uniskela changed the title ci: refresh Context7 library when docs change ci: refresh Context7 after a Release Please release Oct 8, 2026
@uniskela
uniskela merged commit dcd8e7d into main Oct 8, 2026
12 checks passed
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