Skip to content

chore: add API sync workflow - #99

Merged
jhelison merged 6 commits into
mainfrom
chore/api-ref-update
Jul 15, 2026
Merged

chore: add API sync workflow#99
jhelison merged 6 commits into
mainfrom
chore/api-ref-update

Conversation

@jhelison

Copy link
Copy Markdown
Collaborator

Description

This adds pipelines to sync API references to our docs

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation (updates documentation on the project)
  • chore (Updates on dependencies, gitignore, etc)
  • test (For updates on tests)

How Has This Been Tested?

This is the test

Copilot AI review requested due to automatic review settings July 15, 2026 15:18
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jhelison, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74fcca64-6ca7-4c4f-8489-97b67379c575

📥 Commits

Reviewing files that changed from the base of the PR and between 6b4c4d3 and 13601bb.

📒 Files selected for processing (1)
  • .github/workflows/sync-kiiex-openapi.yml

Walkthrough

Adds 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)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding a workflow to sync API references.
Description check ✅ Passed The description is related to the changeset and correctly mentions syncing API references to docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/api-ref-update

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/sync-kiiex-openapi.yml (1)

76-78: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Pin 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

📥 Commits

Reviewing files that changed from the base of the PR and between e94c6e8 and 6b4c4d3.

📒 Files selected for processing (1)
  • .github/workflows/sync-kiiex-openapi.yml

Comment thread .github/workflows/sync-kiiex-openapi.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 via workflow_dispatch) to sync a specific backend tag/release.
  • Checks out KiiEx/kiiex-backend, regenerates docs via scripts/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.

Comment thread .github/workflows/sync-kiiex-openapi.yml
Comment thread .github/workflows/sync-kiiex-openapi.yml
Comment thread .github/workflows/sync-kiiex-openapi.yml Outdated
Comment thread .github/workflows/sync-kiiex-openapi.yml
@jhelison
jhelison merged commit f0e7512 into main Jul 15, 2026
1 check 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.

3 participants