Agent Skillsopen-mercato/open-mercato › om-auto-publish-pr

om-auto-publish-pr

GitHub

通过GitHub CLI触发Package Previews工作流,为指定PR发布pkg.pr.new预览包。用于维护者请求发布或重新发布预览时,自动执行流程并反馈运行状态。

.ai/skills/om-auto-publish-pr/SKILL.md open-mercato/open-mercato

Trigger Scenarios

维护者要求发布PR预览 需要重新触发PR预览

Install

npx skills add open-mercato/open-mercato --skill om-auto-publish-pr -g -y
More Options

Non-standard path

npx skills add https://github.com/open-mercato/open-mercato/tree/main/.ai/skills/om-auto-publish-pr -g -y

Use without installing

npx skills use open-mercato/open-mercato@om-auto-publish-pr

指定 Agent (Claude Code)

npx skills add open-mercato/open-mercato --skill om-auto-publish-pr -a claude-code -g -y

安装 repo 全部 skill

npx skills add open-mercato/open-mercato --all -g -y

预览 repo 内 skill

npx skills add open-mercato/open-mercato --list

SKILL.md

Frontmatter
{
    "name": "om-auto-publish-pr",
    "description": "Publish pkg.pr.new package previews for a same-repository Open Mercato PR by dispatching the Package Previews GitHub Actions workflow with gh. Use when a maintainer asks to publish, republish, or trigger a PR package preview. Does not publish npm snapshots."
}

Auto Publish PR Preview

Dispatch the Package Previews workflow for a PR. This publishes pkg.pr.new previews only; do not invoke NPM Snapshot Preview from this skill.

Arguments

  • {pr_number} (required) - Pull request number to publish previews for.
  • --repo <owner/name> (optional) - Defaults to the current repository.
  • --ref <branch> (optional) - Workflow definition ref. Default: develop.

Procedure

  1. Resolve inputs and confirm the PR exists:
REPO="${REPO:-$(gh repo view --json nameWithOwner --jq .nameWithOwner)}"
PR_NUMBER="{pr_number}"
WORKFLOW_REF="${WORKFLOW_REF:-develop}"

gh pr view "$PR_NUMBER" --repo "$REPO" \
  --json number,title,headRepositoryOwner,headRefName,headRefOid,isCrossRepository
  1. If isCrossRepository is true, stop. The workflow rejects fork PRs because it runs publish-capable automation from a trusted workflow context.

  2. Dispatch the preview workflow:

gh workflow run package-previews.yml \
  --repo "$REPO" \
  --ref "$WORKFLOW_REF" \
  -f "pr_number=$PR_NUMBER"
  1. Find the newest run for the workflow and report it:
sleep 3
gh run list \
  --repo "$REPO" \
  --workflow package-previews.yml \
  --limit 5
  1. Final response must include:
  • PR number and title.
  • The workflow ref used.
  • The dispatch command result.
  • The newest relevant run URL when available.

Guardrails

  • Do not commit, push, label, or merge anything.
  • Do not dispatch npm-snapshot-preview.yml; that is intentionally a separate manual path.
  • If the workflow is not found on develop, tell the user to pass --ref <branch-with-workflow> or wait until the workflow change is merged.

Version History

  • c915d76 Current 2026-07-24 20:42

Same Skill Collection

.ai/skills/codex/backend-ui-design/SKILL.md
.ai/skills/om-app-spec-writing/SKILL.md
.ai/skills/om-auto-continue-pr-loop/SKILL.md
.ai/skills/om-auto-create-pr-loop/SKILL.md
.ai/skills/om-auto-qa-scenarios/SKILL.md
.ai/skills/om-auto-review-pr/SKILL.md
.ai/skills/om-auto-sec-report-pr/SKILL.md
.ai/skills/om-auto-sec-report/SKILL.md
.ai/skills/om-auto-upgrade-0.4.10-to-0.5.0/SKILL.md
.ai/skills/om-backend-ui-design/SKILL.md
.ai/skills/om-code-review/SKILL.md
.ai/skills/om-create-agents-md/SKILL.md
.ai/skills/om-dev-container-maintenance/SKILL.md
.ai/skills/om-ds-guardian/SKILL.md
.ai/skills/om-fix-specs/SKILL.md
.ai/skills/om-followup-issue-from-pr/SKILL.md
.ai/skills/om-help/SKILL.md
.ai/skills/om-implement-spec/SKILL.md
.ai/skills/om-integration-builder/SKILL.md
.ai/skills/om-integration-tests/SKILL.md
.ai/skills/om-migrate-mikro-orm/SKILL.md
.ai/skills/om-pre-implement-spec/SKILL.md
.ai/skills/om-prepare-issue/SKILL.md
.ai/skills/om-prepare-test-env/SKILL.md
.ai/skills/om-skill-creator/SKILL.md
.ai/skills/om-smart-test/SKILL.md
.ai/skills/om-spec-writing/SKILL.md
.ai/skills/om-create-ai-agent/SKILL.md
.ai/skills/om-gap-analysis/SKILL.md

Metadata

Files
0
Version
d61843e
Hash
f8a0d522
Indexed
2026-07-24 20:42

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 07:50
浙ICP备14020137号-1 $Гость$