ci: improve pkg.pr.new install comment clarity#168
Conversation
📝 WalkthroughWalkthroughThe GitHub Actions workflow Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
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)
Comment |
Greptile SummaryThis PR improves the pkg.pr.new CI workflow comment by splitting the install guidance into two clearly-labelled sections ("CLI update" and "Skill update") and switching comment detection from a fragile Key changes:
One minor transition note: Existing open PRs that already carry the old-format bot comment won't be detected by the new marker, so their next workflow run will create a second comment rather than update the existing one. This resolves itself naturally as PRs close, but a one-time backward-compatible guard in the Confidence Score: 5/5Safe to merge; all changes are cosmetic improvements to CI comment formatting with no impact on build or release logic. The only finding is a P2 transition concern about duplicate comments on already-open PRs — a one-time cosmetic issue with no functional consequences. The previous P1 concern (hard failure on deleted-fork PRs) has been fully addressed by the new graceful fallback. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant W as Workflow (pkg-pr-new.yml)
participant G as GitHub API
W->>W: Build preview package
W->>W: Publish to pkg.pr.new → output.json
W->>W: Read url from output.json
W->>W: Read sourceRepo & sourceBranch from PR payload
W->>W: Build body with HTML marker + CLI section + Skill section
W->>G: List PR comments (paginated)
G-->>W: comments[]
W->>W: Find comment with "pkg-pr-new-install-guide" marker
alt Marker found (existing comment)
W->>G: updateComment(comment_id, body)
else No marker found
W->>G: createComment(issue_number, body)
end
Reviews (3): Last reviewed commit: "ci: avoid hard fail when PR head metadat..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/pkg-pr-new.yml:
- Line 63: The install command uses unsupported repo#branch syntax in the string
`npx skills add ${sourceRepo}#${sourceBranch} -y -g`; change it to use the full
GitHub URL with the branch path by replacing `${sourceRepo}#${sourceBranch}`
with `https://github.com/${sourceRepo}/tree/${sourceBranch}` so the `npx skills
add` invocation installs from the specified branch.
🪄 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
Run ID: 9555eb5a-3112-430b-8ce4-f6ea487d5ce3
📒 Files selected for processing (1)
.github/workflows/pkg-pr-new.yml
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@fe09a9061d3ac4adb99416c755b5dfc51120d954🧩 Skill updatenpx skills add larksuite/cli#codex/improve-pkg-pr-new-comment -y -g |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/pkg-pr-new.yml (1)
54-54:⚠️ Potential issue | 🟠 MajorUse a documented branch source format for
skills add.Line 54 uses
owner/repo#branch, which is likely not a supported branch selector for theskillsCLI, so the generated install command can fail or ignore the intended branch.Proposed fix
- `npx skills add ${sourceRepo}#${sourceBranch} -y -g`, + `npx skills add https://github.com/${sourceRepo}/tree/${sourceBranch} -y -g`,In the official Skills CLI documentation, what is the supported syntax for installing from a specific non-default branch using `npx skills add`?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pkg-pr-new.yml at line 54, The workflow currently builds the install command as `npx skills add ${sourceRepo}#${sourceBranch} -y -g`, but the Skills CLI expects the documented branch selector format; update the template to use the CLI's supported branch syntax (e.g., replace `${sourceRepo}#${sourceBranch}` with the documented branch spec such as `${sourceRepo}:${sourceBranch}` or whatever the Skills docs require) and verify against the official Skills CLI docs so `npx skills add` installs the correct non-default branch.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/pkg-pr-new.yml:
- Line 54: The workflow currently builds the install command as `npx skills add
${sourceRepo}#${sourceBranch} -y -g`, but the Skills CLI expects the documented
branch selector format; update the template to use the CLI's supported branch
syntax (e.g., replace `${sourceRepo}#${sourceBranch}` with the documented branch
spec such as `${sourceRepo}:${sourceBranch}` or whatever the Skills docs
require) and verify against the official Skills CLI docs so `npx skills add`
installs the correct non-default branch.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0269276c-279b-4f67-bfbf-62b356fada79
📒 Files selected for processing (1)
.github/workflows/pkg-pr-new.yml
* ci: improve pkg.pr.new install comment clarity * ci: add emojis to pkg.pr.new install comment headings * ci: avoid hard fail when PR head metadata is missing --------- Co-authored-by: kongenpei <kongenpei@users.noreply.github.com>
Summary
Improve the pkg.pr.new PR comment so the install guidance is clearer and harder to miss.
Changes
CLI updateandSkill update.npx skills add <source_repo>#<source_branch> -y -gbased on PR source repo/branch.Summary by CodeRabbit
New Features
Chores