Mpt ext task open pull request
Skill softwareone-platform/mpt-extension-skills/skills/mpt-ext-task-open-pull-request
Only open or update a repository-compliant pull request to publish committed work, reusing the existing PR instead of duplicating. Does not update docs, run checks, or transition Jira.From its SKILL.md
npx -y skills add softwareone-platform/mpt-extension-skills --skill mpt-ext-task-open-pull-requestAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.4 KB, as published. Nobody here has run it
Open Pull Request
Purpose
Create or update a repository-compliant pull request for committed work.
Use When
- The user wants to open a pull request for the current branch.
- The user wants to update the title or description of an existing pull request.
- The task requires applying repository PR rules before publishing work for review.
- The branch already contains the intended committed changes.
Do Not Use When
- The task is to create or switch branches.
- The task is to create the commit itself.
- The task is to transition Jira issue state.
- The task is to handle review comments after the pull request already exists.
Inputs
- Current branch or explicit head branch.
- Optional explicit base branch.
- Optional Jira issue key for the work being published.
- GitHub authentication that can read and create or edit pull requests for the target repository.
- Local Git checkout and network access needed for the repository-supported GitHub tooling.
- Jira authentication is required only when the task must emit a Jira item URL from
acli jira auth status. - Repository PR rules from repo docs and shared standards.
- Installed shared package root:
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current
Workflow
- Build repository context first.
- Read the target repository
AGENTS.mdonce per session. If you already loaded it earlier in this session and still have its full contents, reuse them instead of re-reading; if the context was summarized or you are unsure it is complete, read it again. Do not pre-load shared docs in this step; read them lazily only when the repository points to them. - Read repository-specific docs when they exist, because they may extend or override shared guidance.
- Read shared docs only when the repository explicitly points to them. Resolve those shared docs from
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/currentwhen available; otherwise read them from themainbranch of the shared GitHub repository.
- Resolve the target PR context.
- Determine the current repository and head branch.
- Determine the intended base branch from repo context or user direction.
- Use
mpt-ext-tool-gh-pr-opsto check whether a PR already exists for the branch.
- Read PR rules before mutation.
- Use repository PR rules from repo docs first.
- When the repository relies on this shared package standard for PR formatting, read
standards/pull-requests.mdusing the shared-doc resolution rule from the repository context step, and use it as the source of truth. - Build the complete PR title and description before creating the PR. Follow
standards/pull-requests.mdfor the description-at-creation rule and the AI-generated warning line;mpt-ext-tool-gh-pr-opssets them atomically. - Render the title deterministically with the bundled
render_pr_title.pyso the Jira key, the summary, and any[HF]/[BACKPORT]marker match what the shared Danger action enforces:
python3 "${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-open-pull-request/scripts/render_pr_title.py" \
--jira-key MPT-1234 \
--summary "<short summary>" \
--kind feature \
--base-branch main
- Create or update the PR.
- If no PR exists for the branch, create a new PR through
mpt-ext-tool-gh-pr-ops, which sets the complete description at creation (or uses the draft-then-ready flow when it cannot be finalized yet). - If a PR already exists for the branch, update the existing PR instead of creating a duplicate.
- Report the result clearly.
- Show whether the PR was created or updated.
- Show the PR title.
- Show the PR URL.
- When the Jira issue key is available, try to resolve the Jira site through
acli jira auth statusand build the Jira item URL ashttps://<site>/browse/<issue-key>. - Include testing status in the user-facing result message.
- Use the bundled deterministic script to render the compact user-facing output after successful PR creation or update:
python3 "${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-open-pull-request/scripts/render_result.py" \
--pr-url "<pr-url>" \
--jira-site "<site-from-acli-jira-auth-status>" \
--jira-key MPT-1234 \
--testing "<testing-status>"
- If the Jira item URL is not available safely, omit that line instead of inventing it.
- If
acli jira auth statusdoes not return a reliable site value, omit theJira:line instead of inventing it. - Show blockers clearly when auth, permissions, missing branch context, or GitHub API failures prevent the operation.
Guardrails
- Never create a duplicate PR when one already exists for the branch.
- Never open a PR with a placeholder body and fill it in later; rely on
mpt-ext-tool-gh-pr-opsandstandards/pull-requests.mdfor the description-at-creation and draft-then-ready flow. - Never invent PR formatting rules; read repository context first.
- Never mix commit creation, branch creation, or Jira transitions into this task.
- Never silently choose the wrong base branch when repo context or user intent is ambiguous.
Bundled Resources
scripts/render_result.py- Inputs: PR URL, testing status, optional Jira site, and optional Jira key
- Output: compact user-facing
PR, optionalJira, andTestinglines - Runtime path:
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-open-pull-request/scripts/render_result.py
scripts/render_pr_title.py- Inputs:
--jira-key,--summary,--kind {feature,bugfix,hotfix,backport}(defaultfeature),--base-branch(defaultmain), optional--json - Output: the PR title
[MARKER ]<JIRA-ID> <summary>; validates the Jira key and rejects a Conventional Commit prefix in the summary; adds[HF]/[BACKPORT]only for release-branch PRs - Runtime path:
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-open-pull-request/scripts/render_pr_title.py
- Inputs:
Expected Outcome
The current branch has a repository-compliant pull request that was either created or updated successfully, or the task stops with a clear blocker that explains what must be fixed before the PR can be opened.