Skip to content

Commit bd6210e

Browse files
authored
Merge pull request #4 from MikeGarde/summarize-prs
Introduce Pull Request summarization feature
2 parents 81f6e2c + 867b437 commit bd6210e

File tree

3 files changed

+461
-34
lines changed

3 files changed

+461
-34
lines changed

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# commitbot
1+
# Commit Bot
22

33
**commitbot** is a Rust-based CLI tool that helps generate clear, structured Git commit messages using an LLM (such as OpenAI’s GPT models).
44
It can analyze your staged changes, summarize each file interactively, and produce a well-organized commit message describing the intent behind the changes.
@@ -9,10 +9,12 @@ It can analyze your staged changes, summarize each file interactively, and produ
99
- Simple one-shot mode for fast commits.
1010
- Configurable model selection (e.g. `gpt-4o-mini`).
1111

12-
> **⚠️ Privacy Notice**
13-
> At this time, **commitbot** does not support using a local LLM model.
14-
> When the `--model` option is enabled, your staged diffs are sent to the configured API provider (e.g., OpenAI) for analysis.
15-
> Future versions will introduce support for specifying a custom API endpoint and integrating with self-hosted or alternative LLM providers to keep all processing local or at least internal.
12+
### ⚠️ Privacy Notice
13+
At this time, `commitbot` does not support using a local LLM model.
14+
When the `--model` option is enabled, your staged diffs are sent to the OpenAI for analysis.
15+
16+
Future versions will introduce support for specifying a custom API endpoint and integrating with self-hosted or
17+
alternative LLM providers to keep all processing local or at least internal.
1618

1719
## Installation
1820

@@ -35,7 +37,7 @@ export PATH="$HOME/.cargo/bin:$PATH"
3537
### From Git (no manual clone)
3638

3739
```
38-
cargo install --git https://github.com/YOUR_USERNAME/commitbot --force
40+
cargo install --git https://github.com/mikegarde/commitbot --force
3941
```
4042

4143
## Usage
@@ -67,9 +69,24 @@ For each file you can choose:
6769

6870
After all files are classified, **commitbot** summarizes and generates a full commit message.
6971

72+
### Pull Request Summaries
73+
74+
`commitbot` can also generate clear, high-level **Pull Request descriptions** by summarizing the commit history between two branches.
75+
Instead of sending an enormous diff to the model, it analyzes the **commit or PR messages** to produce a concise overview of the feature branch’s purpose and major changes.
76+
77+
- It collects all commits between a **base** branch (such as `develop` or `main`) and the **feature** branch.
78+
- If multiple PR numbers are detected in commit messages (e.g., `#123`), `commitbot` groups them and references each PR in the summary.
79+
- Otherwise, it summarizes the commits directly.
80+
- The tool can also be forced into either mode with flags.
81+
82+
```
83+
commitbot pr develop
84+
commitbot pr develop feat/ISSUE-201-registration
85+
```
86+
7087
### OpenAI / ChatGPT
7188

72-
This needs your API Key as an environment variable.
89+
`commitbot` needs your API Key as an environment variable.
7390

7491
```
7592
export OPENAI_API_KEY="sk-..."

Taskfile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ tasks:
4949
publish:
5050
desc: "Publish crate to crates.io"
5151
cmds:
52-
- cargo publish
52+
- cargo publish

0 commit comments

Comments
 (0)