Refresh the wiki on a schedule through OpenCode Go - #20
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 48 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a GitHub Actions workflow that runs OpenWiki updates manually or daily, configures the OpenAI-compatible provider, and opens a pull request containing only regenerated paths. ChangesOpenWiki automation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant OpenWiki
participant Repository
participant PullRequestAction
GitHubActions->>Repository: Checkout repository
GitHubActions->>OpenWiki: Run configured code update
OpenWiki->>Repository: Regenerate configured paths
GitHubActions->>PullRequestAction: Submit regenerated path changes
PullRequestAction->>Repository: Commit changes and create pull request
🚥 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: 3
🤖 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/openwiki-update.yml:
- Line 26: The OpenWiki workflow installs dependencies without a reproducible
lockfile. Replace the global npm install in the workflow step with installation
from a checked-in package manifest and lockfile using npm ci, ensuring openwiki,
mermaid, and jsdom remain pinned before the scheduled automation runs.
- Around line 3-6: Add workflow-level concurrency configuration alongside the
existing triggers in the workflow, using a stable group for OpenWiki update runs
and setting cancel-in-progress to false. This must serialize scheduled and
manually dispatched executions so they do not overlap while updating the same
branch and pull request.
- Around line 16-17: Update the checkout step in the workflow to set
persist-credentials to false, then configure peter-evans/create-pull-request to
receive github.token explicitly so pull request creation remains authenticated
without persisting write credentials in the workspace.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b50652e3-270d-4006-a54e-1093db38ad89
📒 Files selected for processing (1)
.github/workflows/openwiki-update.yml
|
|
||
| - name: Install OpenWiki | ||
| # mermaid + jsdom are optional; they add high-fidelity validation of Mermaid diagrams. Remove if your wiki has none. | ||
| run: npm install --global openwiki@0.2.3 mermaid@11.16.0 jsdom@29.1.1 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Workflow files:"
git ls-files .github/workflows || true
echo
echo "Target workflow excerpt:"
if [ -f .github/workflows/openwiki-update.yml ]; then
nl -ba .github/workflows/openwiki-update.yml | sed -n '1,120p'
else
echo "missing .github/workflows/openwiki-update.yml"
fi
echo
echo "Package manifests in repo:"
git ls-files | grep -E '(^|/)package(-lock)?\.json$|(^|/)npm-shrinkwrap\.json$|(^|/)pnpm-lock\.yaml$|(^|/)yarn\.lock$|(^|/)bun\.lockb?$' || true
echo
echo "Relevant npm install/CI commands:"
rg -n "npm (install|ci|exec)\b|--global|openwiki@|mermaid@|jsdom@" .github workflow 2>/dev/null || true
echo
echo "All repository files mentioning openwiki:"
rg -n "\bopenwiki\b" . || trueRepository: yuta24/FineUIKit
Length of output: 300
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Target workflow:"
if [ -f .github/workflows/openwiki-update.yml ]; then
awk '{printf "%5d %s\n", NR, $0}' .github/workflows/openwiki-update.yml
else
echo "missing .github/workflows/openwiki-update.yml"
fi
echo
echo "Package manifests and lockfiles:"
git ls-files | grep -E '(^|/)package(-lock)?\.json$|(^|/)npm-shrinkwrap\.json$|(^|/)pnpm-lock\.yaml$|(^|/)yarn\.lock$|(^|/)bun\.lockb?$' || true
echo
echo "Relevant npm commands and openwiki references:"
rg -n "npm (install|ci|exec)\b|--global|openwiki@|mermaid@|jsdom@" .github || true
rg -n "\bopenwiki\b" . || trueRepository: yuta24/FineUIKit
Length of output: 2982
Make the OpenWiki npm toolchain reproducible.
The scheduled automation installs openwiki, mermaid, and jsdom with npm install --global, and the repo has no checked-in package manifest/lockfile for this path. Transitive dependencies can change between runs with write permissions, including API key access; install from a checked-in package manifest with npm ci, or otherwise pin immutable artifacts/integrity hashes before running automation.
🧰 Tools
🪛 zizmor (1.28.0)
[warning] 26-26: ad-hoc installation of packages (adhoc-packages): installs a package outside of a lockfile
(adhoc-packages)
🤖 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/openwiki-update.yml at line 26, The OpenWiki workflow
installs dependencies without a reproducible lockfile. Replace the global npm
install in the workflow step with installation from a checked-in package
manifest and lockfile using npm ci, ensuring openwiki, mermaid, and jsdom remain
pinned before the scheduled automation runs.
Source: Linters/SAST tools
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Summary
OpenWiki を定期的に再生成する GitHub Actions ワークフローを追加します。毎日 08:00 UTC に
openwiki code --updateを実行し、差分があればopenwiki/updateブランチに PR を作成します。モデルとプロバイダー
OpenCode Go (
glm-5.2) を利用します。OpenWiki には OpenCode 専用のプロバイダーが無いため、OpenAI 互換サーフェスをopenai-compatibleプロバイダー経由で叩いています。OPENAI_COMPATIBLE_BASE_URLは API ルート (https://opencode.ai/zen/go/v1) を指定する必要があります。/chat/completionsで終わる URL は OpenWiki 側のバリデーションで弾かれますopenai-compatibleは既定モデルを持たないためOPENWIKI_MODEL_IDは必須です必要な Secrets
OPENCODE_API_KEYLANGSMITH_API_KEYNotes
add-pathsにこのワークフロー自身は含めていません。GITHUB_TOKENは.github/workflows配下への push を許可されておらず、変更が発生した場合に PR 作成ステップが失敗するためです🤖 Generated with Claude Code
Summary by CodeRabbit