| name | commit-push-mr |
| description | Commit, push, and open a Merge Request (GitLab) |
| disable-model-invocation | true |
| allowed-tools | ["Bash(git checkout --branch*)","Bash(git checkout -b*)","Bash(git add*)","Bash(git status*)","Bash(git fetch*)","Bash(git push*)","Bash(git commit*)","Bash(glab mr create*)","Bash(glab mr view*)"] |
Context
- Current git status: !
git status
- Current git diff (staged and unstaged changes): !
git diff HEAD
- Current branch: !
git branch --show-current
- Commit messages diff with main: !
git log main..HEAD --oneline
glab mr view --output json 2>/dev/null || true: !glab mr view --output json 2>/dev/null || true
Your task
Based on the above changes:
- Create a new branch if on main
- Create a single commit with an appropriate message
- Push the branch to origin with upstream set (e.g.,
git push -u origin <branch-name>)
- Create a merge request using
glab mr create. The MR title and description MUST reflect all commits in the branch (refer to "Commit messages diff with main" in the context). Use --fill -y or specify -t (title), -d (description), and -y explicitly.
- IMPORTANT: Sequential bash commands that depend on each other (e.g.,
git add → git commit → git push) MUST NOT be called as separate parallel tool calls in one response. Instead, chain them with && in a single Bash tool call (e.g., git add . && git commit -m "msg" && git push -u origin branch).
- Complete all the above steps. Do not use any other tools or do anything else. Do not send any other text or messages besides these tool calls.