Skip to content

Refresh the wiki on a schedule through OpenCode Go - #20

Merged
yuta24 merged 5 commits into
mainfrom
ci/openwiki-update-workflow
Jul 29, 2026
Merged

Refresh the wiki on a schedule through OpenCode Go#20
yuta24 merged 5 commits into
mainfrom
ci/openwiki-update-workflow

Conversation

@yuta24

@yuta24 yuta24 commented Jul 29, 2026

Copy link
Copy Markdown
Owner

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

Secret 用途
OPENCODE_API_KEY OpenCode Zen コンソールで発行する API キー
LANGSMITH_API_KEY LangSmith トレース(任意)

Notes

  • add-paths にこのワークフロー自身は含めていません。GITHUB_TOKEN.github/workflows 配下への push を許可されておらず、変更が発生した場合に PR 作成ステップが失敗するためです
  • ソースコードの変更はありません

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added an automated OpenWiki update workflow that can run daily or be triggered manually.
    • Automatically generates and submits pull requests containing eligible documentation updates.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 48 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 408b88c4-dfdc-439b-8b57-de40b7a001e6

📥 Commits

Reviewing files that changed from the base of the PR and between dd44951 and 157757b.

📒 Files selected for processing (4)
  • .github/workflows/openwiki-update.yml
  • AGENTS.md
  • CLAUDE.md
  • openwiki/quickstart.md
📝 Walkthrough

Walkthrough

Adds 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.

Changes

OpenWiki automation

Layer / File(s) Summary
Workflow triggers and OpenWiki execution
.github/workflows/openwiki-update.yml
Adds manual and daily scheduled triggers, write permissions, Node.js 22 setup, OpenWiki installation, and the configured update command.
Automated pull-request creation
.github/workflows/openwiki-update.yml
Uses create-pull-request to commit scoped regenerated changes to a dedicated branch and open a pull request with fixed metadata.

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: a scheduled wiki refresh workflow driven by OpenCode Go.
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 ci/openwiki-update-workflow

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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between b10b886 and dd44951.

📒 Files selected for processing (1)
  • .github/workflows/openwiki-update.yml

Comment thread .github/workflows/openwiki-update.yml
Comment thread .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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 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" . || true

Repository: 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" . || true

Repository: 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

yuta24 and others added 4 commits July 29, 2026 12:55
@yuta24
yuta24 merged commit aaebdaf into main Jul 29, 2026
2 checks passed
@yuta24
yuta24 deleted the ci/openwiki-update-workflow branch July 29, 2026 04:27
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