Skip to content
Merged
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
8 changes: 4 additions & 4 deletions cmd/commit-msg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ func main() {
var apiKey string

switch commitLLM {
case "google":
apiKey = os.Getenv("GOOGLE_API_KEY")
case "gemini":
apiKey = os.Getenv("GEMINI_API_KEY")
if apiKey == "" {
log.Fatalf("GOOGLE_API_KEY is not set")
log.Fatalf("GEMINI_API_KEY is not set")
Comment on lines +26 to +29
Copy link
Contributor

@coderabbitai coderabbitai bot Oct 4, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Breaking change: Document migration path for users.

This change renames the LLM provider from "google" to "gemini" and the environment variable from GOOGLE_API_KEY to GEMINI_API_KEY. Existing users will need to:

  1. Update COMMIT_LLM from "google" to "gemini"
  2. Rename the environment variable from GOOGLE_API_KEY to GEMINI_API_KEY

Ensure this migration is documented in release notes, README, or a migration guide.

Run the following script to check for references to the old naming that may need updates in documentation:


🏁 Script executed:

#!/bin/bash
# Description: Find references to "google" provider and GOOGLE_API_KEY in documentation

# Search for references to the old "google" provider name
echo "=== Searching for 'google' provider references in docs ==="
rg -i --type=md 'COMMIT_LLM.*google|provider.*google' -C 3

# Search for GOOGLE_API_KEY references
echo "=== Searching for GOOGLE_API_KEY references ==="
rg 'GOOGLE_API_KEY' --type=md -C 3

# Search in README files
echo "=== Checking README files ==="
fd -e md -e txt README --exec cat {}

Length of output: 6678


Document migration path for renaming from google to gemini.

Add a note in the README or release notes that users upgrading from previous versions must rename:

  • COMMIT_LLM=googleCOMMIT_LLM=gemini
  • GOOGLE_API_KEYGEMINI_API_KEY
🤖 Prompt for AI Agents
In cmd/commit-msg/main.go around lines 26 to 29, the launcher now reads
GEMINI_API_KEY for the "gemini" case but there is no documented migration
guidance for users of the prior "google" configuration; update the project
README (or release notes) to document the rename steps: instruct users to change
COMMIT_LLM=google → COMMIT_LLM=gemini and rename environment variable
GOOGLE_API_KEY → GEMINI_API_KEY, include an example snippet showing both old and
new settings and a short note about when this change was introduced
(version/release) so upgrading users can apply the migration.

Copy link
Owner

Choose a reason for hiding this comment

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

@adeeshperera can u check this

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

}
case "grok":
apiKey = os.Getenv("GROK_API_KEY")
Expand Down Expand Up @@ -112,7 +112,7 @@ func main() {
}

var commitMsg string
if os.Getenv("COMMIT_LLM") == "google" {
if os.Getenv("COMMIT_LLM") == "gemini" {
commitMsg, err = gemini.GenerateCommitMessage(config, changes, apiKey)
} else if os.Getenv("COMMIT_LLM") == "chatgpt" {
commitMsg, err = chatgpt.GenerateCommitMessage(config, changes, apiKey)
Expand Down
4 changes: 2 additions & 2 deletions internal/scrubber/scrubber.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ var (
Redact: "${1}=\"[REDACTED_GITHUB_TOKEN]\"",
},
{
Name: "Google API Key",
Name: "Gemini API Key",
Pattern: regexp.MustCompile(`(?i)(google[_-]?api[_-]?key|GOOGLE_API_KEY|GEMINI_API_KEY)\s*[=:]\s*["\']?(AIza[a-zA-Z0-9_\-]{35})["\']?`),
Redact: "${1}=\"[REDACTED_GOOGLE_API_KEY]\"",
Redact: "${1}=\"[REDACTED_GEMINI_API_KEY]\"",
},
{
Name: "OpenAI API Key",
Expand Down
6 changes: 3 additions & 3 deletions internal/scrubber/scrubber_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ func TestScrubAPIKeys(t *testing.T) {
expected: `OPENAI_API_KEY="[REDACTED_OPENAI_KEY]"`,
},
{
name: "Google API key",
input: `GOOGLE_API_KEY="AIzaSyDabcdefghijklmnopqrstuvwxyz12345"`,
expected: `GOOGLE_API_KEY="[REDACTED_GOOGLE_API_KEY]"`,
name: "Gemini API key",
input: `GEMINI_API_KEY="AIzaSyDabcdefghijklmnopqrstuvwxyz12345"`,
expected: `GEMINI_API_KEY="[REDACTED_GEMINI_API_KEY]"`,
},
{
name: "Claude API key",
Expand Down
Loading