| name | docs-workflow-create-mr |
| description | Create or find an existing merge request (GitLab) or pull request (GitHub) for the published documentation branch. Skipped in draft mode or when the branch was not pushed. Use when this capability is needed. |
| metadata | {"author":"DonaghBr"} |
Create MR/PR Step
Step skill for the docs-orchestrator pipeline. Creates a GitLab MR or GitHub PR for the feature branch pushed by the commit step.
Skipped when --draft is set or when commit-info.json has pushed: false.
Arguments
$1 — JIRA ticket ID (required)
--base-path <path> — Base output path (e.g., .claude/docs/proj-123)
--repo-path <path> — Accepted for compatibility but unused (context comes from commit-info.json)
--draft — If present, skip MR/PR creation entirely
Input
<base-path>/commit/commit-info.json
Produced by the commit step. Must have pushed: true for this step to proceed.
Output
<base-path>/create-mr/mr-info.json
<base-path>/create-mr/step-result.json
mr-info.json contains platform, MR/PR URL, action taken (created, found_existing, or skipped), and title. step-result.json is the standard sidecar with MR/PR metadata.
Execution
Run the create-mr script, passing through all arguments:
bash ${CLAUDE_SKILL_DIR}/scripts/create_mr.sh <ticket> --base-path <base-path> [--repo-path <path>] [--draft]
The script handles:
- Draft mode check — writes a skip record and exits if
--draft is set
- Commit check — reads
commit-info.json and skips if branch was not pushed
- Context resolution — determines platform and repo URL from
commit-info.json, default branch from repo-info.json if available
- Existing MR/PR check — looks for an open MR/PR from the feature branch before creating a new one
- MR/PR creation — creates a GitLab MR (via
glab CLI) or GitHub PR (via gh CLI)
- Output — writes
mr-info.json with the MR/PR URL and metadata, and step-result.json sidecar
Source: DonaghBr/redhat-docs-agent-tools — distributed by TomeVault.