agentleFS
opendatahub-ioopendatahub-io/docs-skills/skills/docs-workflow-create-merge-request/SKILL.md

docs-workflow-create-merge-request

Skill4 starsChanged 4 months agoApache-2.0View on GitHub

Commit, push, and create a merge request (GitLab) or pull request (GitHub) for documentation changes. Creates a feature branch if the repo is on main/master. Replaces docs-workflow-prepare-branch, docs-workflow-commit, and docs-workflow-create-mr.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the script, passing through all arguments:

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Merge Request Step

Step skill for the docs-orchestrator pipeline. After writing and reviews are complete, this step creates a feature branch (if needed), commits the manifest-listed files, pushes to the remote, and creates an MR/PR via gh (GitHub) or glab (GitLab).

Skipped in draft mode (--draft flag). When --repo-path is set, the script operates in the target repo but expects the user to have already switched to a feature branch.

Arguments

  • $1 — JIRA ticket ID (required)
  • --base-path <path> — Base output path (e.g., .agent_workspace/proj-123)
  • --draft — If present, skip all git operations
  • --repo-path <path> — Target documentation repository (must already be on a feature branch)

Input

<base-path>/writing/step-result.json

Contains the files array of absolute paths to commit (written by the writing step).

Output

<base-path>/create-merge-request/step-result.json

Combined sidecar with commit, push, and MR/PR metadata.

Execution

Run the script, passing through all arguments:

bash ${CLAUDE_SKILL_DIR}/scripts/create_merge_request.sh <ticket> --base-path <base-path> [--draft] [--repo-path <path>]

The script handles:

  1. Skip mode — writes a skip sidecar and exits if --draft is set
  2. Git context — resolves repo root, current branch, remote URL, and platform (GitHub/GitLab)
  3. Branch creation — if on main or master (and no --repo-path), creates <ticket-lowercase> branch from HEAD or switches to it if it already exists
  4. Safety — refuses to proceed if on main/master with --repo-path (externally managed repos must be on a feature branch)
  5. Manifest reading — reads file paths from writing/step-result.json and filters to files under the repo root
  6. Staging and commit — stages manifest files and commits with docs(<ticket>): add generated documentation
  7. Push — pushes with --force-with-lease to origin
  8. Title building — derives MR/PR title from requirements/step-result.json title field or first heading in requirements.md
  9. Existing check — searches for an open MR/PR from the feature branch before creating a new one
  10. MR/PR creation — creates via gh pr create (GitHub) or glab mr create (GitLab), with fork detection for GitLab via the upstream remote
  11. Sidecar — writes step-result.json with commit_sha, branch, pushed, url, action, platform, skipped, and skip_reason fields

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.