Skip to content

git-push-and-create-merge-request-ja

Pushes the current branch to origin and creates a GitHub Pull Request (PR) or a GitLab Merge Request (MR). It also supports GitHub Enterprise and Self-Managed GitLab. If an open PR / MR already exists, it only pushes.

It does not run from the main or master branch. It does not force push.

Put /skill:git-push-and-create-merge-request-ja <arguments> at the start of your input and send it. There are two arguments, and both are optional.

  • Target branch: specify it as a sentence, such as “マージ先を develop にして” (use develop as the target branch). Without it, the skill uses main, and uses master only if main does not exist on origin.
  • Related Issue numbers: specify them as #123, 123, or several numbers separated by spaces (#123 #124). Each number you specify is added as Closes #<number> at the end of the PR / MR description.

This skill is not manual-start only. The Agent may start it on its own judgment based on your request. Its description says to use it when you ask for a push and the creation of a PR / MR.

Pressing the “Push” button at the top of the Changes Pane also sends /skill:git-push-and-create-merge-request-ja to the chat.

  • Use it when you want to push a feature branch whose changes are already committed and create a PR / MR.
  • Also use it when you want to push additional commits to a branch that already has a PR / MR. In this case, it does not create a new PR / MR.
  • It requires gh for GitHub or glab for GitLab to be installed and authenticated for the origin host.

Example input:

/skill:git-push-and-create-merge-request-ja #123

According to the skill’s instructions, the result is as follows.

  • It determines from the origin host whether it is GitHub or GitLab, and checks the authentication. If it cannot determine the service or authentication fails, it explains how to log in and ends.
  • If the current branch is main or master, if there are uncommitted changes, or if there are no commits to push, it reports the reason and ends.
  • If an open PR / MR already exists, it only pushes, and reports the URL of that PR / MR and that it pushed.
  • Otherwise, it creates a PR / MR after pushing. The title is the commit message if there is one commit, or a Japanese title summarizing everything if there are several. The description is in Japanese and consists of the sections “概要” (Overview), “変更内容” (Changes), and “影響範囲” (Scope of impact), plus “関連Issue” (Related Issues) when related Issues are found.
  • It looks for related Issue numbers in the arguments, then the branch name (such as feature/issue-123), then the commit messages, and adds a Closes #<number> line to the description for each number found. If none are found, it still creates the PR / MR and reports that no close keyword was added.
  • When it ends, it reports the service and host it determined, the URL and title of the PR / MR, the target branch and the current branch, the number of commits and the main changes, and the related Issues.
  • It does not force push. It does not add an AI agent’s signature or attribution to the PR / MR description.

Position in the AI-driven development workflow

Section titled “Position in the AI-driven development workflow”

It is the 9th of the 11 steps in the AI-driven development workflow. The previous step is git-commit-ja, and the next step is git-review-merge-request-ja. For the order of the steps, see “Order in the AI-driven development workflow” in Bundled skills.