-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add genui sdk submodule #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a GenUI SDK Git submodule, updates VitePress config (exclusions, rewrites, sidebar, redirects), introduces a NavTabFactory and product-specific NavTab subclasses with a re-export, updates header to use the factory and new GenUI-SDK tab, and adds SSH-based submodule handling to CI workflows. Changes
Sequence Diagram(s)sequenceDiagram
participant Browser
participant Router
participant CustomHeader
participant NavTabFactory
participant ThemeConfig
Browser->>Router: navigate to /genui-sdk/...
Router->>CustomHeader: route changed (route, path)
CustomHeader->>NavTabFactory: getTabs(activeProductTab, route, site, ThemeConfig)
NavTabFactory->>ThemeConfig: read nav/product mappings and detect path
NavTabFactory-->>CustomHeader: return GenUI-SDK tab set
CustomHeader->>Browser: render header with GenUI-SDK tab
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @.gitmodules:
- Around line 13-15: The repository declares a submodule "genui-sdk" in
.gitmodules but the genui-sdk directory is not initialized (missing .git
metadata), preventing access to docs like docs/src/guide/installation.md and
docs/src/api/api.md; initialize the submodule by updating/initializing the
genui-sdk submodule (e.g., run the appropriate git submodule update --init for
genui-sdk) so the genui-sdk/.git is present and the expected documentation files
become available.
In @.vitepress/theme/components/CustomHeader.vue:
- Around line 314-324: Remove the unused NavTab class declaration (the class
named NavTab and its getTabs() method) from CustomHeader.vue since the component
uses NavTabFactory from "../entity" instead; delete the entire class block to
eliminate dead code and the stray `return` that yields undefined, and scan for
any references to NavTab to ensure nothing else depends on it before committing.
In @.vitepress/theme/entity/nav-tab.ts:
- Around line 100-112: productTabs in CustomHeader.vue includes "tiny-robot" but
navTabClassMap and navPathMap in nav-tab.ts lack entries, so "tiny-robot" falls
back to the base NavTab; either add explicit mappings or document the omission.
Fix by creating a TinyRobotNavTab class (or reuse an existing one) and add
'tiny-robot': TinyRobotNavTab to navTabClassMap and 'tiny-robot': '/tiny-robot/'
to navPathMap, or alternatively add a clear comment above
navTabClassMap/navPathMap explaining that tiny-robot intentionally uses the
default NavTab and default path behavior; update any factory logic that looks up
navTabClassMap/navPathMap if necessary to rely on the default when absent.
🧹 Nitpick comments (5)
.vitepress/config.mts (1)
79-79: Verify the rewrite pattern for API documentation.The current rewrite rule maps both
guideandapisections to the samegenui-sdk/guide/base path:'genui-sdk/docs/src/:section(guide|api)/:path*': 'genui-sdk/guide/:path*'This means:
genui-sdk/docs/src/guide/installation.md→/genui-sdk/guide/installationgenui-sdk/docs/src/api/api.md→/genui-sdk/guide/apiWhile this works for the initial setup with minimal documentation, consider whether API documentation should have its own distinct base path (e.g.,
genui-sdk/api/) to:
- Avoid potential naming conflicts between guide and API files
- Provide clearer URL structure for documentation consumers
- Follow common documentation conventions
If the current pattern is intentional for simplicity, this is fine for now but may need adjustment as documentation grows.
.vitepress/theme/components/TabNavigation.vue (1)
188-193: Horizontal overflow consideration.Adding
white-space: nowrapwill prevent tab wrapping, which is appropriate for the tab bar. However, as more products are added, consider addingoverflow-x: autoto enable horizontal scrolling on smaller viewports, or handle this in the empty responsive block at line 309-310..vitepress/theme/entity/nav-tab.ts (3)
14-18: Consider stronger typing for better type safety.The constructor type and class properties use
anyextensively. Consider defining proper interfaces forroute,site, andthemeConfigto improve type safety and IDE support.🔎 Example type improvement
import type { Route } from 'vitepress' interface SiteData { value: { base: string // ... other properties } } interface ThemeConfig { nav?: configNavItem[] engineNav?: configNavItem[] // ... other properties } type NavTabConstructor = new ( activeProductTab: string, site: SiteData, themeConfig?: ThemeConfig ) => NavTab
39-46: Redundant fallback aftermap().The outer
|| []is unnecessary since(nav || []).map(...)always returns an array. Same applies to line 79-86.🔎 Proposed simplification
getTabs(): TabItem[] { const prefix = this.site.value.base || '/' const { nav } = this.themeConfig - return ( - (nav || []).map((item: configNavItem) => ({ - key: this.getConfigKey(item.link) || item.text.toLowerCase().replace(/\s+/g, '-'), - name: item.text, - link: `${prefix}${item.link.slice(1)}`, - disabled: false - })) || [] - ) + return (nav || []).map((item: configNavItem) => ({ + key: this.getConfigKey(item.link) || item.text.toLowerCase().replace(/\s+/g, '-'), + name: item.text, + link: `${prefix}${item.link.slice(1)}`, + disabled: false + })) }
50-58: Subclass constructors can be omitted.When a subclass constructor only calls
super()with the same parameters, it can be removed. TypeScript automatically inherits the parent constructor. This applies to all four subclasses.🔎 Example for NextSdkNavTab
class NextSdkNavTab extends NavTab { - constructor(activeProductTab: string, site: any, themeConfig?: any) { - super(activeProductTab, site, themeConfig) - } - getTabs(): TabItem[] { return [{ key: 'guide', name: '使用文档', link: '/next-sdk/guide/' }] } }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
public/images/logo-active-genui-sdk.svgis excluded by!**/*.svgpublic/images/logo-normal-genui-sdk.svgis excluded by!**/*.svg
📒 Files selected for processing (8)
.gitmodules.vitepress/config.mts.vitepress/theme/Layout.vue.vitepress/theme/components/CustomHeader.vue.vitepress/theme/components/TabNavigation.vue.vitepress/theme/entity/index.ts.vitepress/theme/entity/nav-tab.tsgenui-sdk
🔇 Additional comments (8)
.vitepress/config.mts (2)
42-47: LGTM! Source exclusion configured correctly.The addition of
genui-sdk/packages/**/*.mdtosrcExcludefollows the established pattern for other submodules and will properly exclude package-level markdown files from VitePress processing.
217-232: LGTM! Sidebar configuration is appropriate for initial setup.The GenUI SDK sidebar configuration is well-structured with:
- Introduction section linking to installation guide
- API documentation section for API reference
The minimal structure is appropriate for an initial documentation scaffold and follows the same pattern as other product sidebars in the config. This can be expanded as more documentation is added.
genui-sdk (1)
1-1: Submodule integration is correctly configured. No issues found.All integration points are properly set up:
.gitmodulescorrectly defines genui-sdk with path and remote URL.vitepress/config.mtsproperly routes genui-sdk docs (genui-sdk/docs/src/:section(guide|api)/:path*→genui-sdk/guide/:path*) and includes sidebar configuration- GitHub workflows (auto-deploy.yml, deploy-obs.yml) correctly initialize submodules with
submodules: recursiveand execute proper sync/update commands- Commit
319fe22dc10ddc27040880749b7f7933f64c9f02is correctly pinned.vitepress/theme/entity/index.ts (1)
1-1: LGTM!Clean barrel export that properly exposes the nav-tab module exports.
.vitepress/theme/Layout.vue (1)
88-92: LGTM!The GenUI SDK redirect entry is consistent with the existing redirect patterns and correctly targets the installation guide.
.vitepress/theme/components/CustomHeader.vue (2)
497-498: LGTM!Route handling for GenUI SDK paths is consistent with the existing product detection pattern.
446-453: Logo assets confirmed. Bothlogo-active-genui-sdk.svgandlogo-normal-genui-sdk.svgexist in the/public/images/directory and are properly referenced..vitepress/theme/entity/nav-tab.ts (1)
90-98: LGTM!The
GenuiSdkNavTabclass follows the established pattern and correctly returns the installation guide link, consistent with the redirect configuration inLayout.vue.
|
@lhuans commit 历史有点乱,麻烦处理下 |
88d866f to
2b061ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.vitepress/theme/components/CustomHeader.vue (2)
26-26: Consider moving inline width to CSS.The hardcoded
width: 540pxinline style could be moved to a CSS class for better maintainability and to support responsive design if needed in the future.🔎 Optional refactor
Move the width to the scoped styles:
<TabNavigation :tabs="productTabs" :activeTab="activeProductTab" @tab-change="handleProductTabChange" - style="width: 540px" + class="product-tabs" />Add to the
<style>section:.product-tabs { width: 540px; }
483-495: Consider refactoring repetitive route checking logic.The sequential if-else chain for product detection could be simplified using a lookup approach for improved maintainability as more products are added.
🔎 Optional refactor using a map
+// Product route mapping +const productRouteMap = { + '/next-sdk/': 'next-sdk', + '/genui-sdk/': 'genui-sdk', + '/tiny-robot/': 'tiny-robot', + '/tiny-vue/': 'tiny-vue', + '/tiny-engine/': 'tiny-engine', +}; + watch( () => route.path, () => { getActiveNavTab(); const path = route.path.replace(new RegExp(`^${site.value.base}`), "/"); - if (path.includes("/next-sdk/")) { - activeProductTab.value = "next-sdk"; - } else if (path.includes("/genui-sdk/")) { - activeProductTab.value = "genui-sdk"; - } else if (path.includes("/tiny-robot/")) { - activeProductTab.value = "tiny-robot"; - } else if (path.includes("/tiny-vue/")) { - activeProductTab.value = "tiny-vue"; - } else if (path.includes("/tiny-engine/")) { - activeProductTab.value = "tiny-engine"; - } else { - activeProductTab.value = ""; - } + const matchedProduct = Object.entries(productRouteMap).find(([route]) => + path.includes(route) + ); + activeProductTab.value = matchedProduct ? matchedProduct[1] : ''; }, { deep: true, immediate: true } );
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.vitepress/theme/components/CustomHeader.vue.vitepress/theme/components/TabNavigation.vue
🔇 Additional comments (4)
.vitepress/theme/components/TabNavigation.vue (1)
191-191: LGTM - Layout adjustment for flexible tab spacing.The change from
gap: 2remtojustify-content: space-aroundprovides more flexible spacing that adapts as tabs are added or removed, which aligns well with the GenUI-SDK tab addition in this PR..vitepress/theme/components/CustomHeader.vue (3)
316-317: LGTM - Clean factory pattern usage.The migration to
NavTabFactorycentralizes navigation tab configuration logic, making it easier to maintain and extend as new products are added.
434-441: LGTM - GenUI-SDK tab integration looks complete.The new GenUI-SDK product tab follows the established pattern with proper configuration for key, name, link, and logo. The implementation is consistent with existing product tabs.
485-486: LGTM - Route handling properly integrated.The genui-sdk path detection correctly sets the active product tab when navigating to GenUI-SDK routes, maintaining consistency with the existing route handling pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.vitepress/theme/components/CustomHeader.vue:
- Around line 434-441: The navigation entry for the GenUI-SDK in
CustomHeader.vue (the object with key "genui-sdk" and link
`${prefix}genui-sdk/guide/installation`) points to a non-existent docs target;
fix by either creating the missing documentation file at
genui-sdk/docs/src/guide/installation.md (with frontmatter and content) so the
route exists, or change the link in CustomHeader.vue to an existing route (e.g.,
point to an existing product guide or the GenUI landing page) so the navigation
no longer leads to a 404; update the src/logo reference only if you also rename
the route so assets and link stay in sync.
🧹 Nitpick comments (2)
.vitepress/theme/components/CustomHeader.vue (2)
26-26: Consider dynamic width calculation for better maintainability.The hardcoded
610pxwidth accommodates the current 5 product tabs but will require manual adjustment when adding more products. Consider usingwidth: fit-contentor calculating the width dynamically based on the number of tabs.
738-738: Verify responsive behavior with the new fit-content width.The
width: fit-contenton.header-bottomallows the navigation to size dynamically. While this provides flexibility, please verify it doesn't cause layout issues at various screen sizes, particularly on narrower viewports where tabs might overflow.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.vitepress/theme/components/CustomHeader.vue
🔇 Additional comments (3)
.vitepress/theme/components/CustomHeader.vue (3)
316-318: Good refactor to use factory pattern for navigation tabs.The migration from manual navigation tab construction to
NavTabFactoryimproves maintainability and centralizes tab configuration logic. The factory signature is clean and passes the necessary context (product, route, site, theme config).
485-486: LGTM! Route handling for GenUI-SDK is consistent.The path detection logic for GenUI-SDK follows the same pattern as other products and correctly updates the active product tab when navigating to genui-sdk routes.
289-289: NavTabFactory import is properly implemented and exported.The
NavTabFactoryis correctly exported from.vitepress/theme/entity/index.tsvia re-export fromnav-tab.ts(line 127), and the factory properly handles all product types includinggenui-sdkwith the correspondingGenuiSdkNavTabclass and path mapping.
| { | ||
| key: "genui-sdk", | ||
| name: "GenUI-SDK", | ||
| link: `${prefix}genui-sdk/guide/installation`, | ||
| src: `${prefix}images/logo-${ | ||
| activeProductTab.value === "genui-sdk" ? "active" : "normal" | ||
| }-genui-sdk.svg`, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Find all SVG files related to genui-sdk
find . -type f -name "*genui-sdk*" 2>/dev/null | head -20Repository: opentiny/docs
Length of output: 140
🏁 Script executed:
# Check for logo files in common image directories
fd -t f "logo.*genui-sdk" . 2>/dev/nullRepository: opentiny/docs
Length of output: 140
🏁 Script executed:
# Search for genui-sdk directory structure
fd -t d "genui-sdk" . --max-depth 3 2>/dev/nullRepository: opentiny/docs
Length of output: 69
🏁 Script executed:
# Look for installation-related docs
rg "installation" -t md --files . 2>/dev/null | grep -i genuiRepository: opentiny/docs
Length of output: 39
🏁 Script executed:
# Check the CustomHeader.vue file to see the pattern of other product tabs
fd -t f "CustomHeader.vue" -exec head -n 500 {} \; | tail -n 200Repository: opentiny/docs
Length of output: 287
🏁 Script executed:
# List the structure of genui-sdk directory
find ./genui-sdk -type f -name "*.md" | head -30Repository: opentiny/docs
Length of output: 39
🏁 Script executed:
# Check if guide/installation exists
ls -la ./genui-sdk/guide/ 2>/dev/null || echo "guide directory not found"Repository: opentiny/docs
Length of output: 82
🏁 Script executed:
# Look for installation-related files in genui-sdk
find ./genui-sdk -type f -name "*installation*" 2>/dev/nullRepository: opentiny/docs
Length of output: 39
🏁 Script executed:
# Check overall structure of genui-sdk
ls -la ./genui-sdk/ 2>/dev/nullRepository: opentiny/docs
Length of output: 167
🏁 Script executed:
# Check vitepress config files
fd -t f "config" .vitepress/ -e ts -e js -e mtsRepository: opentiny/docs
Length of output: 78
🏁 Script executed:
# Look at sidebar configuration
fd -t f "sidebar" . -e ts -e js -e mtsRepository: opentiny/docs
Length of output: 39
🏁 Script executed:
# Check what other product links point to (examine CustomHeader.vue more carefully)
cat -n .vitepress/theme/components/CustomHeader.vue | sed -n '400,500p'Repository: opentiny/docs
Length of output: 3395
🏁 Script executed:
# Check if there's documentation outside genui-sdk dir
find . -type d -name "guide" | head -10Repository: opentiny/docs
Length of output: 39
🏁 Script executed:
# Check the vitepress config
cat -n .vitepress/config.mts | head -100Repository: opentiny/docs
Length of output: 4483
🏁 Script executed:
# Search for genui-sdk in config
rg "genui-sdk" .vitepress/config.mtsRepository: opentiny/docs
Length of output: 274
GenUI-SDK logo assets are present, but the documentation target does not exist.
The logo files exist, however, the genui-sdk documentation directory is empty. The link /genui-sdk/guide/installation (line 437) points to documentation that has not been created yet. The vitepress config is prepared to handle genui-sdk docs at genui-sdk/docs/src/guide/, but no files exist there. This creates a broken link in the navigation component.
Either create the GenUI-SDK documentation at genui-sdk/docs/src/guide/installation.md or adjust the link target to point to an existing route.
🤖 Prompt for AI Agents
In @.vitepress/theme/components/CustomHeader.vue around lines 434 - 441, The
navigation entry for the GenUI-SDK in CustomHeader.vue (the object with key
"genui-sdk" and link `${prefix}genui-sdk/guide/installation`) points to a
non-existent docs target; fix by either creating the missing documentation file
at genui-sdk/docs/src/guide/installation.md (with frontmatter and content) so
the route exists, or change the link in CustomHeader.vue to an existing route
(e.g., point to an existing product guide or the GenUI landing page) so the
navigation no longer leads to a 404; update the src/logo reference only if you
also rename the route so assets and link stay in sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.vitepress/config.mts:
- Around line 218-233: The sidebar entry '/genui-sdk/guide/' references
non-existent docs (items '安装指南' -> 'installation' and 'API文档' -> 'api') because
the genui-sdk submodule is empty; initialize and populate the genui-sdk
submodule and add the expected markdown files matching the rewrite rule
'genui-sdk/docs/src/:section(guide|api)/:path*' — specifically create
genui-sdk/docs/src/guide/installation.md and genui-sdk/docs/src/api/api.md (or
adjust the rewrite/sidebar if you prefer different paths) so the sidebar links
resolve.
🧹 Nitpick comments (1)
.vitepress/config.mts (1)
218-233: Consider refining the API documentation label.The group title "API文档" (line 227) and its single child item "API文档" (line 230) have identical text, creating redundancy in the sidebar navigation. Consider either:
- Renaming the item to be more specific (e.g., "API 参考" or "接口文档")
- Or removing the group wrapper if there's only one item
♻️ Example refinement
{ text: 'API文档', base: '/genui-sdk/guide/', items: [ - { text: 'API文档', link: 'api' } + { text: 'API 参考', link: 'api' } ] }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.vitepress/config.mts
🔇 Additional comments (2)
.vitepress/config.mts (2)
42-47: LGTM! Consistent exclusion pattern.The addition of
genui-sdk/packages/**/*.mdtosrcExcludecorrectly follows the established pattern for other submodules.
79-79: LGTM! Rewrite rule correctly consolidates paths.The rewrite rule appropriately maps both
guideandapisource sections to the unifiedgenui-sdk/guide/path, which aligns with the sidebar structure.
| '/genui-sdk/guide/': [ | ||
| { | ||
| text: '介绍', | ||
| base: '/genui-sdk/guide/', | ||
| items: [ | ||
| { text: '安装指南', link: 'installation' }, | ||
| ] | ||
| }, | ||
| { | ||
| text: 'API文档', | ||
| base: '/genui-sdk/guide/', | ||
| items: [ | ||
| { text: 'API文档', link: 'api' } | ||
| ] | ||
| } | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if genui-sdk submodule exists and what markdown files are present
if [ -d "genui-sdk" ]; then
echo "=== Searching for installation.md ==="
find genui-sdk -name "installation.md" -type f 2>/dev/null || echo "Not found"
echo -e "\n=== Searching for api.md ==="
find genui-sdk -name "api.md" -type f 2>/dev/null || echo "Not found"
echo -e "\n=== All markdown files in genui-sdk (up to 2 levels) ==="
find genui-sdk -maxdepth 3 -name "*.md" -type f 2>/dev/null | head -30
echo -e "\n=== Directory structure of genui-sdk/docs (if exists) ==="
if [ -d "genui-sdk/docs" ]; then
ls -la genui-sdk/docs/ 2>/dev/null || echo "Cannot list"
else
echo "genui-sdk/docs does not exist"
fi
else
echo "genui-sdk submodule directory not found"
fiRepository: opentiny/docs
Length of output: 271
🏁 Script executed:
#!/bin/bash
# Check what actually exists in the genui-sdk directory
echo "=== Contents of genui-sdk (root level) ==="
ls -la genui-sdk/ 2>/dev/null | head -20
echo -e "\n=== Directory structure (tree-like view up to 3 levels) ==="
find genui-sdk -maxdepth 3 -type d 2>/dev/null | head -20
echo -e "\n=== All files in genui-sdk (first 30 files) ==="
find genui-sdk -type f 2>/dev/null | head -30Repository: opentiny/docs
Length of output: 330
🏁 Script executed:
#!/bin/bash
# Check if genui-sdk is a git submodule and its status
echo "=== Check git configuration for genui-sdk ==="
if [ -f ".gitmodules" ]; then
cat .gitmodules | grep -A 5 "genui-sdk" || echo "No genui-sdk submodule entry found"
else
echo ".gitmodules file not found"
fi
echo -e "\n=== Check git status for submodules ==="
git config --file .gitmodules --get-regexp path || echo "No submodule paths found"
echo -e "\n=== Check if any documentation exists for genui-sdk elsewhere ==="
find . -maxdepth 3 -type d -name "*genui*" 2>/dev/null | grep -v ".git"
echo -e "\n=== Check current config.mts for context (lines around 218-233) ==="
sed -n '210,240p' .vitepress/config.mtsRepository: opentiny/docs
Length of output: 1478
🏁 Script executed:
#!/bin/bash
# Check if we can verify the remote genui-sdk repository contents
# First, let's see if we can access the remote URL
echo "=== Check remote genui-sdk repository (list files via git ls-remote) ==="
git ls-remote --heads [email protected]:opentiny/genui-sdk.git 2>/dev/null | head -5
echo -e "\n=== Try to fetch submodule info using git ==="
git submodule status genui-sdk 2>/dev/null || echo "Cannot get submodule status"
echo -e "\n=== Check if there's a workaround - look at similar submodule references ==="
grep -n "'/.*-sdk/guide/'" .vitepress/config.mts | head -10
echo -e "\n=== Check if sidebar paths reference actually configured routes ==="
grep -n "'/genui-sdk" .vitepress/config.mts -A 2 -B 2Repository: opentiny/docs
Length of output: 1123
🏁 Script executed:
#!/bin/bash
# Check the vitepress configuration more thoroughly
echo "=== Check for route definitions in config.mts ==="
grep -n "rewrite" .vitepress/config.mts -A 5 -B 2 || echo "No rewrite rules found"
echo -e "\n=== Check for publicDir or documentation source mappings ==="
grep -n "publicDir\|srcDir\|srcExclude" .vitepress/config.mts
echo -e "\n=== Check if there's a vitepress config for handling submodules ==="
grep -n "submodule\|sdk" .vitepress/config.mts | head -20
echo -e "\n=== Check vitepress docs directory structure ==="
ls -la docs/ 2>/dev/null | head -20
echo -e "\n=== Look for any genui-sdk documentation in the main docs ==="
find docs -type d -name "*genui*" 2>/dev/null || echo "No genui-sdk dir in docs"
echo -e "\n=== Check full route paths in config ==="
grep -n "^[[:space:]]*'/" .vitepress/config.mts | head -15Repository: opentiny/docs
Length of output: 1789
🏁 Script executed:
#!/bin/bash
# Now let's verify what the actual expected file structure should be based on the rewrite rules
echo "=== Analyzing rewrite rules for genui-sdk ==="
echo "Rewrite rule: 'genui-sdk/docs/src/:section(guide|api)/:path*': 'genui-sdk/guide/:path*'"
echo ""
echo "Expected file mappings:"
echo " installation link should map to: genui-sdk/docs/src/guide/installation.md"
echo " api link should map to: genui-sdk/docs/src/api/api.md"
echo ""
echo "=== Check if similar patterns work in other submodules ==="
ls -la next-sdk/docs/ 2>/dev/null || echo "next-sdk/docs not found"
echo -e "\n=== List actual files in other submodules for comparison ==="
find next-sdk -maxdepth 3 -type f -name "*.md" 2>/dev/null | head -10
echo -e "\n=== Confirm genui-sdk is empty ==="
ls -la genui-sdk/ 2>/dev/null
find genui-sdk -type f 2>/dev/null | wc -lRepository: opentiny/docs
Length of output: 642
🏁 Script executed:
#!/bin/bash
# Let's check the pattern of the sidebar configuration more carefully
echo "=== Extract the full sidebar configuration for genui-sdk ==="
sed -n '218,233p' .vitepress/config.mts
echo -e "\n=== Check vitepress rewrite rule interpretation ==="
echo "The rewrite rule pattern: 'genui-sdk/docs/src/:section(guide|api)/:path*': 'genui-sdk/guide/:path*'"
echo ""
echo "When link='installation' is clicked in route '/genui-sdk/guide/':"
echo " - Requested path would be: /genui-sdk/guide/installation"
echo " - This should rewrite to look for: genui-sdk/docs/src/guide/installation.md"
echo ""
echo "When link='api' is clicked in route '/genui-sdk/guide/':"
echo " - Requested path would be: /genui-sdk/guide/api"
echo " - This should rewrite to look for: genui-sdk/docs/src/api/api.md"
echo -e "\n=== Verify no other genui-sdk references in config ==="
grep -i "genui" .vitepress/config.mts | wc -l
grep -i "genui" .vitepress/config.mtsRepository: opentiny/docs
Length of output: 1282
The genui-sdk submodule is empty and will result in broken links.
The sidebar references files (installation.md and api.md) that do not exist in the genui-sdk submodule. The submodule directory is currently unpopulated. Based on the rewrite rule 'genui-sdk/docs/src/:section(guide|api)/:path*': 'genui-sdk/guide/:path*', the links expect:
genui-sdk/docs/src/guide/installation.mdgenui-sdk/docs/src/api/api.md
Initialize the genui-sdk submodule and ensure these documentation files exist at the expected paths.
🤖 Prompt for AI Agents
In @.vitepress/config.mts around lines 218 - 233, The sidebar entry
'/genui-sdk/guide/' references non-existent docs (items '安装指南' -> 'installation'
and 'API文档' -> 'api') because the genui-sdk submodule is empty; initialize and
populate the genui-sdk submodule and add the expected markdown files matching
the rewrite rule 'genui-sdk/docs/src/:section(guide|api)/:path*' — specifically
create genui-sdk/docs/src/guide/installation.md and
genui-sdk/docs/src/api/api.md (or adjust the rewrite/sidebar if you prefer
different paths) so the sidebar links resolve.
99fc9eb to
121b278
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/build-docs.yml (1)
41-50: Using--remote --mergebreaks build reproducibility.The
git submodule update --remote --merge --recursivecommand on line 48 updates submodules to the latest remote commit, overriding any pinned commit references. This creates non-deterministic builds where different CI runs may use different submodule versions.Impact:
- Breaking changes in genui-sdk could cause unexpected build failures
- Difficult to reproduce historical builds
- Debugging issues becomes harder when submodule versions are inconsistent
Recommendation: Remove the
--remote --mergestep to use the pinned commit references from the repository.🔒 Proposed fix for reproducible builds
- name: Ensure submodules are up-to-date (pull latest from their remote) - # 这一步会把子模块更新到各自远端的最新分支(通常是子模块配置的上游) run: | git submodule sync --recursive git submodule update --init --recursive - # 拉取子模块的远端最新提交(合并到当前子模块工作树) - # 注意:这不会把变化提交回主仓库;仅用于构建时使用最新子模块内容 - git submodule update --remote --merge --recursive - # 打印状态便于调试 git submodule status --recursiveIf you intentionally want the latest docs content, consider creating a scheduled workflow to update submodule references rather than doing it dynamically during each build.
🤖 Fix all issues with AI agents
In @.github/workflows/build-docs.yml:
- Line 28: Update the GitHub Actions step that references the
webfactory/ssh-agent action by changing its version tag from v0.8.0 to the
latest stable v0.9.1; locate the line that contains "uses:
webfactory/[email protected]" in the workflow and replace the tag so the action
runs with webfactory/[email protected] to pick up the fixes and improvements.
🧹 Nitpick comments (2)
.github/workflows/build-docs.yml (2)
32-37: Update the comment to reflect actual behavior.The comment on line 32 says "含递归子模块" (with recursive submodules), but
submodules: falseis set on line 37. The comment should reflect that submodules are handled manually in subsequent steps.📝 Suggested comment fix
- # 3. 现在 checkout(含递归子模块) + # 3. Checkout (submodules handled manually in subsequent steps)
38-40: Consider a more scalable approach for submodule URL conversion.The current implementation hardcodes the genui-sdk submodule URL. If additional private submodules are added in the future, each would require a separate hardcoded line, making maintenance more difficult.
♻️ More scalable alternative
- name: Force submodule URL to SSH run: | - git config --file=.gitmodules submodule.genui-sdk.url [email protected]:opentiny/genui-sdk.git + # Convert all HTTPS submodule URLs to SSH format + sed -i 's|https://github.com/|[email protected]:|g' .gitmodulesThis approach automatically converts all GitHub HTTPS URLs to SSH format, supporting multiple private submodules without modification.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-docs.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (2)
.github/workflows/build-docs.yml (2)
27-30: LGTM! SSH agent setup is correct.The SSH agent is properly configured before checkout to enable access to the private genui-sdk submodule. Ensure that the
SUBMODULE_SSH_KEYsecret is configured in the repository settings.
3-12: Verify if genui-sdk changes should trigger the workflow.The workflow triggers on changes to various documentation paths, but the newly added
genui-sdk/**path is not included. This means changes to the genui-sdk submodule won't trigger documentation builds.If genui-sdk documentation should be built when the submodule is updated, consider adding it to the trigger paths:
paths: - 'genui-sdk/**' - 'next-sdk/docs/**' - 'tiny-robot/docs/**' # ... other pathsHowever, if genui-sdk has its own CI pipeline or if you only want to build when the submodule reference is updated (not submodule content), the current configuration may be intentional.
| runs-on: ubuntu-latest | ||
| steps: | ||
| # 1. 注入私钥(支持多行) | ||
| - uses: webfactory/[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
webfactory/ssh-agent GitHub Action latest version releases
💡 Result:
Latest release: v0.9.1 — released March 17, 2024. [1][2]
Sources:
[1] webfactory/ssh-agent Releases (GitHub).
[2] Commit / CHANGELOG for v0.9.1 (GitHub).
Update webfactory/ssh-agent to the latest version.
The workflow uses webfactory/[email protected], but the latest stable version is v0.9.1 (released March 17, 2024). Update to the latest version to benefit from bug fixes and improvements.
🤖 Prompt for AI Agents
In @.github/workflows/build-docs.yml at line 28, Update the GitHub Actions step
that references the webfactory/ssh-agent action by changing its version tag from
v0.8.0 to the latest stable v0.9.1; locate the line that contains "uses:
webfactory/[email protected]" in the workflow and replace the tag so the action
runs with webfactory/[email protected] to pick up the fixes and improvements.
121b278 to
311f157
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/build-docs.yml (1)
38-47: Using--remote --mergemay cause non-reproducible builds.The command
git submodule update --remote --merge --recursivefetches the latest commits from submodule remotes rather than using the pinned commit references stored in the parent repository. This can lead to:
- Non-reproducible builds: Different CI runs may build against different submodule versions
- Unexpected failures: Breaking changes in submodules could break the build without any change to this repository
- Inconsistency: The built docs may not match what the pinned submodule commits would produce
If the intent is to always use the latest submodule content, this is fine but should be a deliberate choice. For reproducible builds, consider removing the
--remote --mergeline:Suggested fix for reproducible builds
run: | git submodule sync --recursive git submodule update --init --recursive - # 拉取子模块的远端最新提交(合并到当前子模块工作树) - # 注意:这不会把变化提交回主仓库;仅用于构建时使用最新子模块内容 - git submodule update --remote --merge --recursive # 打印状态便于调试 git submodule status --recursiveIf you intentionally want the latest submodule content, consider adding error handling and documenting this behavior more prominently.
🤖 Fix all issues with AI agents
In @.github/workflows/build-docs.yml:
- Around line 27-32: The workflow comments are misnumbered and the SSH action is
outdated: change the comment that currently reads "3. 现在 checkout(含递归子模块)" to
sequentially follow the previous comment (e.g., "2. 现在 checkout(含递归子模块)") and
update the action reference string webfactory/[email protected] to
webfactory/[email protected] so the job uses the latest stable ssh-agent release.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-docs.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (1)
.github/workflows/build-docs.yml (1)
33-37: LGTM!The approach of disabling automatic submodule checkout (
submodules: false) and handling it manually after SSH credentials are available is the correct pattern for private submodules.
| # 1. 注入私钥(支持多行) | ||
| - uses: webfactory/[email protected] | ||
| with: | ||
| ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }} | ||
|
|
||
| # 3. 现在 checkout(含递归子模块) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat -n .github/workflows/build-docs.yml | sed -n '25,50p'Repository: opentiny/docs
Length of output: 1108
🌐 Web query:
webfactory/ssh-agent latest stable version 2025
💡 Result:
The latest stable release is v0.9.1 — released March 17, 2025. [1]
Sources
[1] webfactory/ssh-agent releases (GitHub).
Fix comment numbering and update SSH agent version.
The comments reference step "1" and step "3" but step "2" is missing. Renumber the steps for clarity.
Additionally, webfactory/[email protected] is outdated. Update to the latest stable version v0.9.1 (released March 17, 2025) for security best practices and bug fixes.
🤖 Prompt for AI Agents
In @.github/workflows/build-docs.yml around lines 27 - 32, The workflow comments
are misnumbered and the SSH action is outdated: change the comment that
currently reads "3. 现在 checkout(含递归子模块)" to sequentially follow the previous
comment (e.g., "2. 现在 checkout(含递归子模块)") and update the action reference string
webfactory/[email protected] to webfactory/[email protected] so the job uses the
latest stable ssh-agent release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/deploy-obs.yml:
- Around line 39-41: Update the GitHub Actions step using webfactory/ssh-agent
from v0.8.0 to v0.9.1 and add an inline comment above that step explaining its
purpose (starting an SSH agent for submodule access) and that it expects the
SUBMODULE_SSH_KEY secret to contain the private key for repository submodule
access; reference the action name webfactory/ssh-agent and the secret name
SUBMODULE_SSH_KEY when editing so reviewers can find the change.
🧹 Nitpick comments (1)
.github/workflows/deploy-github.yml (1)
29-31: Update SSH agent action version and add documentation.The SSH agent configuration is consistent across
deploy-github.yml,deploy-obs.yml, andbuild-docs.yml, all usingwebfactory/[email protected]. However,v0.8.0is outdated—v0.9.1is the latest stable version. While no security vulnerabilities are recorded forv0.8.0, consider upgrading tov0.9.1(orv0.9.0+), which updated to Node.js 20. Additionally, add a comment explaining the purpose of the SSH step and theSUBMODULE_SSH_KEYsecret requirement:+ # Setup SSH authentication to access private submodule repositories + # Required secret: SUBMODULE_SSH_KEY (configure in Settings → Secrets → Actions) - uses: webfactory/[email protected] with: ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }}If upgrading to
v0.9.0+, ensure all self-hosted runners have Node.js 20 installed.
| - uses: webfactory/[email protected] | ||
| with: | ||
| ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the latest releases of webfactory/ssh-agent
curl -s https://api.github.com/repos/webfactory/ssh-agent/releases | jq -r '.[0:5] | .[] | .tag_name' | head -20Repository: opentiny/docs
Length of output: 114
🏁 Script executed:
#!/bin/bash
# Also check the repository info and recent activity
curl -s https://api.github.com/repos/webfactory/ssh-agent | jq '{
"name": .name,
"description": .description,
"updated_at": .updated_at,
"stargazers_count": .stargazers_count,
"watchers_count": .watchers_count,
"is_archived": .archived
}'Repository: opentiny/docs
Length of output: 197
🌐 Web query:
webfactory ssh-agent GitHub action latest version security
💡 Result:
Short answer
- Latest published tag: v0.9.1 (current latest release). [1]
- Security posture summary: no public CVE for the action itself, but the action relies on OpenSSH's ssh-agent (which has had several CVEs historically) and has open issues related to behavior on Windows/self-hosted runners and handling of passphrase-protected keys — treat the agent socket and secrets carefully. Recommended mitigations are below. [1][2][3][4]
Sources
- Releases / latest tag (v0.9.1). [1]
- Action README / usage notes (how it handles keys, known limitations). [2]
- Examples of ssh-agent CVE (CVE-2021-28041) and ssh-agent forwarding risks. [3]
- Third‑party security scan / action score and open issues list. [4][5]
Quick recommendations
- Use the published release tag (e.g., webfactory/[email protected]). [1]
- Keep GitHub-hosted runners up to date (they ship GitHub's known_hosts); on self-hosted runners verify Node.js v20 and your known_hosts. [1][2]
- Never store private keys in the repo; use GitHub Secrets and rotate keys regularly. [2]
- Avoid forwarding the agent to untrusted machines; minimize lifetime and scope of keys loaded into the agent. See OpenSSH advisories for agent-specific CVE mitigations. [3]
- Monitor the action’s repo for security advisories / updates and open issues (Windows/passphrase/known_hosts items). [4][5]
Would you like me to: (A) open the CHANGELOG and give exact release dates for v0.9.0/v0.9.1, or (B) show a recommended workflow snippet pinned to v0.9.1?
Update webfactory/ssh-agent to v0.9.1 and add documentation.
The action version is outdated. The latest stable release is v0.9.1 (current version is v0.8.0). Update to the latest version, and add a comment explaining the SSH agent setup and the required SUBMODULE_SSH_KEY secret.
Suggested improvement
+ # Setup SSH authentication to access private submodule repositories
+ # Required secret: SUBMODULE_SSH_KEY (configure in Settings → Secrets → Actions)
- - uses: webfactory/[email protected]
+ - uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }} | |
| # Setup SSH authentication to access private submodule repositories | |
| # Required secret: SUBMODULE_SSH_KEY (configure in Settings → Secrets → Actions) | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }} |
🤖 Prompt for AI Agents
In @.github/workflows/deploy-obs.yml around lines 39 - 41, Update the GitHub
Actions step using webfactory/ssh-agent from v0.8.0 to v0.9.1 and add an inline
comment above that step explaining its purpose (starting an SSH agent for
submodule access) and that it expects the SUBMODULE_SSH_KEY secret to contain
the private key for repository submodule access; reference the action name
webfactory/ssh-agent and the secret name SUBMODULE_SSH_KEY when editing so
reviewers can find the change.
142172a to
311f157
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.github/workflows/deploy-github.yml:
- Around line 32-37: The comment next to "submodules: false" is misleading;
update the inline comment for the actions/checkout step so it accurately
reflects the behavior (e.g., "do not checkout submodules here; submodules are
initialized/updated later") or change the setting to "submodules: true" if you
intend checkout here; also ensure you review the later manual commands (git
submodule sync --recursive, git submodule update --init --recursive, git
submodule update --remote --merge --recursive) and confirm the --remote --merge
behavior is acceptable for deployment.
- Around line 29-31: The workflow currently uses webfactory/[email protected]
with the ssh-private-key input; either upgrade that step to
webfactory/[email protected] (replace webfactory/[email protected] with @v0.9.1
and keep ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }}) or remove the
ssh-agent step entirely and pass the SSH key directly to actions/checkout@v4 by
adding the ssh-key input (use actions/checkout@v4 with ssh-key: ${{
secrets.SUBMODULE_SSH_KEY }}), ensuring you remove the now-unnecessary
webfactory/ssh-agent step if you choose the native checkout approach.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/deploy-github.yml.github/workflows/deploy-obs.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/deploy-obs.yml
| - uses: webfactory/[email protected] | ||
| with: | ||
| ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat -n .github/workflows/deploy-github.ymlRepository: opentiny/docs
Length of output: 2791
🌐 Web query:
webfactory/ssh-agent v0.8.0 GitHub actions
💡 Result:
Summary for webfactory/ssh-agent v0.8.0
-
Release: v0.8.0 published 24 Mar (see release notes). Main change: the action no longer writes GitHub's SSH host keys into known_hosts — users on GitHub-hosted runners need do nothing; self-hosted runners should review/fix their known_hosts. The release also updated to use actions/checkout@v3 and added options to override git/ssh-agent/ssh-add commands. [1]
-
Usage: reference the action as uses: webfactory/[email protected] and pass your SSH private key(s) via the ssh-private-key input (see README/marketplace for inputs like ssh-auth-sock and log-public-key). [2][3]
Sources
[1] webfactory/ssh-agent releases (v0.8.0).
[2] webfactory/ssh-agent README.
[3] GitHub Marketplace listing for webfactory-ssh-agent.
🌐 Web query:
actions/checkout v4 ssh-key parameter support
💡 Result:
Yes — actions/checkout@v4 supports an ssh-key input (SSH private key), plus ssh-known-hosts, ssh-strict, ssh-user, and related SSH inputs. See the official action documentation. [1][2]
Sources:
- actions/checkout README (inputs list including ssh-key). [1]
- GitHub Marketplace / Checkout action page (v4 description). [2]
🌐 Web query:
webfactory/ssh-agent latest version releases 2024 2025
💡 Result:
Found releases on the repository:
- v0.9.1 — released Mar 17, 2025. [1][2]
- v0.9.0 — released Feb 6, 2025. [1]
I did not find any releases in 2024 on the project's Releases page. [1][3]
Sources:
[1] webfactory/ssh-agent Releases (GitHub).
[2] NewReleases mirror showing v0.9.1 (2025-03-17).
[3] webfactory/ssh-agent Issues (shows activity in 2024 but no release entries).
🏁 Script executed:
rg "uses:" .github/workflows/deploy-github.yml -A 2Repository: opentiny/docs
Length of output: 622
Update webfactory/ssh-agent to v0.9.1 (or use actions/checkout@v4's native ssh-key parameter).
The action is on v0.8.0, but v0.9.1 is available as of March 2025. More importantly, actions/checkout@v4 natively supports the ssh-key input parameter, so you can eliminate the separate ssh-agent step entirely and pass your SSH key directly to checkout:
Alternative: using native ssh-key
- - uses: webfactory/[email protected]
- with:
- ssh-private-key: ${{ secrets.SUBMODULE_SSH_KEY }}
- name: Checkout repository (with submodules)
uses: actions/checkout@v4
with:
fetch-depth: 0
+ ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
submodules: falseIf you prefer to keep the ssh-agent approach, upgrade to v0.9.1.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In @.github/workflows/deploy-github.yml around lines 29 - 31, The workflow
currently uses webfactory/[email protected] with the ssh-private-key input;
either upgrade that step to webfactory/[email protected] (replace
webfactory/[email protected] with @v0.9.1 and keep ssh-private-key: ${{
secrets.SUBMODULE_SSH_KEY }}) or remove the ssh-agent step entirely and pass the
SSH key directly to actions/checkout@v4 by adding the ssh-key input (use
actions/checkout@v4 with ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}), ensuring
you remove the now-unnecessary webfactory/ssh-agent step if you choose the
native checkout approach.
| - name: Checkout repository (with submodules) | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # 推荐完整历史以支持 lastUpdated 等 | ||
| submodules: recursive # 检出子模块(递归) | ||
| submodules: false # 检出子模块(递归) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cd .github/workflows && pwd && cat -n deploy-github.ymlRepository: opentiny/docs
Length of output: 2828
🏁 Script executed:
cat -n .gitmodules 2>/dev/null || echo "File .gitmodules not found in root"Repository: opentiny/docs
Length of output: 599
Fix misleading comment about submodule checkout behavior.
Line 36's comment says "检出子模块(递归)" (check out submodules recursively), but submodules: false disables submodule checkout in the actions/checkout step. Submodules are instead initialized and updated manually in the "Ensure submodules are up-to-date" step with git submodule sync --recursive, git submodule update --init --recursive, and git submodule update --remote --merge --recursive.
The .gitmodules file contains SSH URLs ([email protected]:...), which depend on the SSH key loaded via webfactory/ssh-agent—this flow is correct.
Note: The --remote --merge --recursive flags make builds non-reproducible by always tracking the latest remote HEAD of each submodule, which may not be intended for a deployment workflow. Confirm this behavior is acceptable, as it can also introduce merge conflicts if submodule branches diverge.
🤖 Prompt for AI Agents
In @.github/workflows/deploy-github.yml around lines 32 - 37, The comment next
to "submodules: false" is misleading; update the inline comment for the
actions/checkout step so it accurately reflects the behavior (e.g., "do not
checkout submodules here; submodules are initialized/updated later") or change
the setting to "submodules: true" if you intend checkout here; also ensure you
review the later manual commands (git submodule sync --recursive, git submodule
update --init --recursive, git submodule update --remote --merge --recursive)
and confirm the --remote --merge behavior is acceptable for deployment.
add genui sdk submodule
Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.