chore: add API sync workflow - #99
Conversation
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds a GitHub Actions workflow that synchronizes the KiiEx Backend OpenAPI specification to GitBook. It supports release-dispatch and manual triggers, resolves the backend reference, checks out the backend repository, generates the API reference, publishes it with the GitBook CLI, and creates a pull request for resulting documentation changes. Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/sync-kiiex-openapi.yml (1)
76-78: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePin the version of
@gitbook/cli.Installing ad-hoc packages globally without pinning their version exposes the workflow to supply chain attacks and unexpected breakage from future major updates. Consider specifying an exact version or major version tag.
run: | - npm install -g `@gitbook/cli` + npm install -g `@gitbook/cli`@<version> gitbook openapi publish \🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/sync-kiiex-openapi.yml around lines 76 - 78, Update the installation command in the workflow step using `@gitbook/cli` to specify a pinned exact version or major-version tag, while leaving the subsequent gitbook openapi publish invocation unchanged.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/sync-kiiex-openapi.yml:
- Around line 34-40: Update the workflow step containing the REF assignment to
pass github.event.client_payload.tag_name and inputs.ref through the step’s
environment variables, then read those environment variables inside the shell
script instead of embedding GitHub Actions expressions in run. Preserve the
existing fallback, empty-value validation, error message, and GITHUB_OUTPUT
assignment.
---
Nitpick comments:
In @.github/workflows/sync-kiiex-openapi.yml:
- Around line 76-78: Update the installation command in the workflow step using
`@gitbook/cli` to specify a pinned exact version or major-version tag, while
leaving the subsequent gitbook openapi publish invocation unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d7249c3a-a917-4999-9a66-3230509286c6
📒 Files selected for processing (1)
.github/workflows/sync-kiiex-openapi.yml
There was a problem hiding this comment.
Pull request overview
This PR introduces a GitHub Actions workflow to synchronize the KiiEx backend OpenAPI spec into kiichain-docs, publish the raw spec to GitBook, and open a PR with regenerated API reference pages.
Changes:
- Adds a new workflow triggered by
repository_dispatch(and manually viaworkflow_dispatch) to sync a specific backend tag/release. - Checks out
KiiEx/kiiex-backend, regenerates docs viascripts/generate_api_reference.py, publishes the OpenAPI spec to GitBook, and opens a PR with updates.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This adds pipelines to sync API references to our docs
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
This is the test