Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
"source": "./plugins/bitwarden-code-review",
"version": "1.5.2",
"description": "Comprehensive code review system with organization-wide standards."
},
{
"name": "git-workflow",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ’ญ "Naming things is hard" but Claude's version of this calls the plugin "commit commands". I would like to future-proof this so that it can collect the commands an engineer might need here, and that might mean waiting for #15.

"source": "./plugins/git-workflow",
"version": "1.0.0",
"description": "Streamlined git workflow: commit, push, and create/update PR with auto-generated messages following Bitwarden PR template"
}
]
}
21 changes: 21 additions & 0 deletions plugins/git-workflow/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "git-workflow",
"version": "1.0.0",
"description": "Streamlined git workflow: commit, push, and create/update PR with auto-generated messages following Bitwarden PR template",
"author": {
"name": "Bitwarden",
"url": "https://github.com/bitwarden"
},
"homepage": "https://github.com/bitwarden/ai-plugins/tree/main/plugins/git-workflow",
"repository": "https://github.com/bitwarden/ai-plugins",
"keywords": [
"git",
"workflow",
"commit",
"push",
"pull-request",
"automation",
"pr-template"
],
"commands": ["./commands/commit-push-pr.md"]
}
14 changes: 14 additions & 0 deletions plugins/git-workflow/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to the Git Workflow Plugin will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2026-01-09

### Added
- Initial release with `/commit-push-pr` command
- Auto-commit, push, and PR creation workflow
- Integration with Bitwarden PR template
- Jira ticket tracking with auto-extracted PR titles
73 changes: 73 additions & 0 deletions plugins/git-workflow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Git Workflow Plugin

A Claude Code plugin that streamlines the git workflow by automating commit, push, and PR creation in a single command.

## Overview

The Git Workflow plugin automates the complete git workflow: it creates a commit with an auto-generated message, pushes to remote, and creates a pull request following your repository's PR template.

## Features

- **Single-command workflow** - Commit, push, and create PR in one step
- **Auto-generated commit messages** - Analyzes changes to create semantic commit messages
- **PR template integration** - Follows `.github/PULL_REQUEST_TEMPLATE.md` structure
- **Jira integration** - Extracts ticket ID from URL for PR title
- **Automatic branch creation** - Creates feature branch if on main

## Installation

Add the Bitwarden AI Plugin Marketplace to Claude Code:

```bash
/plugin marketplace add bitwarden/ai-plugins
```

Install the git-workflow plugin:

```bash
/plugin install git-workflow@bitwarden-marketplace
```

Restart Claude Code for the plugin to become active.

## Usage

Simply run the command from within your git repository:

```
/commit-push-pr
```

The command will:
1. Create a new branch if you're on main
2. Commit your changes with an auto-generated message
3. Push the branch to origin
4. Ask for your Jira ticket URL
5. Create a PR with the Jira ID as the title and auto-generated body

### Example

```bash
# Make some changes to your code
/commit-push-pr
```

When prompted, provide your Jira URL:
```
https://bitwarden.atlassian.net/browse/PM-123
```

The PR will be created with:
- **Title**: `PM-123` Short descriptive title
- **Body**: Following the Bitwarden PR template with tracking link and objective

## Requirements

- **Git** - Installed and configured
- **GitHub CLI (`gh`)** - Installed and authenticated (`gh auth login`)
- **Repository setup** - Inside a git repository with a remote configured
- **Changes to commit** - Modified tracked files

## Version History

See [CHANGELOG.md](CHANGELOG.md) for version history.
23 changes: 23 additions & 0 deletions plugins/git-workflow/commands/commit-push-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
allowed-tools: Read, Bash(git checkout -b:*), Bash(git add:*), Bash(git status:*), Bash(git push:*), Bash(git commit:*), Bash(gh pr create:*)
description: Commit, push, and open a PR
---

## Context

- Current git status: !`git status`
- Current git diff (staged and unstaged changes): !`git diff HEAD`
- Current branch: !`git branch --show-current`

## Your task

Based on the above changes:

1. Create a new branch if on main
2. Create a single commit with an appropriate message
3. Push the branch to origin
4. Read the PR template at `.github/PULL_REQUEST_TEMPLATE.md`
5. Create a pull request using `gh pr create` with:
- Title: Ask the user for the Jira ticket URL (from bitwarden.atlassian.net) and extract the ID (e.g., "PM-1" or "CL-1000"). Then use that ID to form the title in the format "[JIRA-ID] Short descriptive title"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐ŸŽจ Anything more we can do here by picking up context? Perhaps that's a stretch but it could get Git metadata.

- Body: Following the template structure with the tracking link in the ๐ŸŽŸ๏ธ Tracking section and auto-generated objective in the ๐Ÿ“” Objective section
6. You have the capability to call multiple tools in a single response. You MUST do all of the above in a single message. Do not use any other tools or do anything else. Do not send any other text or messages besides these tool calls.