om-auto-publish-pr

Dispatches the Package Previews GitHub Actions workflow to publish pkg.pr.new previews for a pull request.

1.7k|382|Updated Sep 10, 2025
One-click install
npx skills add https://github.com/open-mercato/open-mercato --skill om-auto-publish-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: om-auto-publish-pr
Source: https://github.com/open-mercato/open-mercato/tree/main/.ai/skills/om-auto-publish-pr
Command: npx skills add https://github.com/open-mercato/open-mercato --skill om-auto-publish-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maintainers of Open Mercato need a controlled way to publish pkg.pr.new package previews for pull requests without manually navigating GitHub Actions, while avoiding accidental npm snapshot publishes or unsafe fork PR dispatches.

Core Features & Use Cases

  • Workflow Dispatch: Triggers the package-previews.yml GitHub Actions workflow for a given PR number using the gh CLI.
  • Fork Safety Check: Verifies the PR is not cross-repository before dispatching, since the workflow runs publish-capable automation from a trusted context.
  • Run Reporting: Locates the newest workflow run and reports the PR title, workflow ref, dispatch result, and run URL.
  • Use Case: A maintainer reviews a same-repository PR and wants reviewers to install preview packages; they invoke this Skill with the PR number to publish pkg.pr.new previews and get back the workflow run link.

Quick Start

Publish package previews for pull request 123 in the current repository using the default develop workflow ref.

Frequently Asked Questions about om-auto-publish-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish pkg.pr.new package previews for a pull request?

Dispatch the package-previews.yml GitHub Actions workflow with the gh CLI, passing the PR number as a workflow input. The workflow builds and publishes pkg.pr.new previews for that pull request.

How do I trigger a GitHub Actions workflow from the command line?

Use gh workflow run with the workflow file name, repository, ref, and any required inputs via -f flags. Then use gh run list to find the newest run and retrieve its URL.

Can I publish package previews for a fork pull request?

No. The workflow rejects cross-repository fork PRs because it runs publish-capable automation from a trusted workflow context. Only same-repository pull requests are supported.

Does this publish npm snapshot previews?

No. This Skill only dispatches the Package Previews workflow for pkg.pr.new previews. The npm-snapshot-preview.yml workflow is a separate manual path and must not be dispatched from this flow.

Why does the workflow dispatch fail with workflow not found?

The workflow file must exist on the ref you dispatch from, which defaults to develop. If it is missing there, pass a --ref pointing to a branch that contains the workflow or wait until the change is merged.