◉GEMINI LABJP
●2.5 ROUTE — From today, 12/1, calls to gemini-2.5-pro and 2.5-flash are rerouted to newer models automatically●CLI 0.71.1 — Gemini CLI stable is still v0.71.1, with a 0.73 nightly published on 11/30●INTRO END — Introductory pricing for 3.8, 3.7 and 3.6 Flash ends on 12/31. 30 days left●VERTEX — Developers are asking how to run Gemini CLI with Vertex AI credentials●NEON — Gemini 4 Neon became generally available on 11/18 (paid tier only)●IMAGE TEXT — A new test shows text inside an image can sway Gemini's answer●2.5 ROUTE — From today, 12/1, calls to gemini-2.5-pro and 2.5-flash are rerouted to newer models automatically●CLI 0.71.1 — Gemini CLI stable is still v0.71.1, with a 0.73 nightly published on 11/30●INTRO END — Introductory pricing for 3.8, 3.7 and 3.6 Flash ends on 12/31. 30 days left●VERTEX — Developers are asking how to run Gemini CLI with Vertex AI credentials●NEON — Gemini 4 Neon became generally available on 11/18 (paid tier only)●IMAGE TEXT — A new test shows text inside an image can sway Gemini's answer
Articles/API / SDK
◈ API / SDK/2026-05-17Beginner

Auto-generating Japanese and English Release Notes from git log with Gemini API — A Real Implementation from Beautiful HD Wallpapers v2.1.0

I realized I was spending 1–2 hours per release writing notes in multiple languages. Here's how I automated that with Gemini API and git log — tested on Beautiful HD Wallpapers v2.1.0, with code you can run today.

gemini-api291python113gitindie-dev49automation55release-notes

While preparing the v2.1.0 release, I stopped and asked myself how much time I actually spend on release notes. Reading back through commits, turning technical language into something a user would understand, then making the Japanese and English versions match: on a big release that alone takes an hour or two.

This post is the record of the small tool I built for that, which drafts bilingual release notes from git log. The first version, written in May 2026, used the old google-generativeai SDK and gemini-2.5-flash. Rereading it in November 2026, some of it no longer runs as written, so I have rewritten the whole thing around the current SDK and a safer way to pick the model.

It is written for someone who writes store release notes by hand every time and keeps their commit messages reasonably descriptive. By the end you should be able to produce a draft from your own repository.

The short answer

Let Gemini draft the notes, and keep the check before publishing for yourself. The machine writes the draft; I answer for what goes into the store. Why I did not automate the last step is in the caveats below.

Why the original code no longer works

What the first version didWhere things stand nowWhat to do
import google.generativeai as genaiThe legacy SDK. The official quickstart has moved to google-genaiUse from google import genai
genai.GenerativeModel("gemini-2.5-flash")The 2.5 family shows no shutdown date in the official deprecations table, yet 404 reports have been coming in since JulyDo not hard-code the model ID; read it from an environment variable
Asking for JSON in the promptAsking leaves room for a Markdown fence around the outputConstrain the shape with response_mime_type and a schema

I wrote up how to read the 2.5 shutdown situation separately, and it is worth reading before you pin any model: Gemini 2.5 Flash returns 404 "no longer available" while the official table still shows no shutdown date.

Why git log is the right input

A commit message is first-hand evidence of what changed and why, written right after the change. It beats anything I reconstruct from memory on release day.

During v2.1.0 I had recorded, with reasons, an IndexOutOfBoundsException on the list screen, a startup problem on older devices after a library update, and a rework of the back-button ad flow. Turning that into user-facing language is a structured-to-structured conversion, which is squarely what language models do well.

The quality of your commit messages is the ceiling for the quality of your release notes. Keep that in mind before you run anything below.

The script (new SDK)

First, what I could and could not verify.

  • Verified: the git log handling, the prompt that --dry-run prints, the error for a tag that does not exist, and the check() function that flags internal terms. I ran these in a throwaway repository.
  • Not verified: the API call inside generate(). In the environment where I did this rewrite I did not run it against my own key through the new SDK. It follows the official documentation, but run --dry-run first and then one short tag range before trusting it.

Setup:

pip install google-genai
export GEMINI_API_KEY="YOUR_API_KEY"
# use an ID that appears in models.list (how to check is in the next section)
export RELEASE_NOTES_MODEL="gemini-3.6-flash"

The script. The model ID comes from the environment, the output shape is constrained by a schema, and the result is checked mechanically for leaked internal terms.

#!/usr/bin/env python3
"""Draft store release notes (ja + en) from git log.
 
Usage:
  export GEMINI_API_KEY=...                       # keep the key out of the code
  export RELEASE_NOTES_MODEL=<a model id from models.list>
  python release_notes.py v2.0.0 --version 2.1.0
  python release_notes.py v2.0.0 --version 2.1.0 --dry-run   # print the input, no API call
"""
import argparse
import json
import os
import re
import subprocess
import sys
 
MODEL = os.environ.get("RELEASE_NOTES_MODEL", "gemini-3.6-flash")
BANNED = re.compile(r"RecyclerView|Glide|NullPointer|IndexOutOfBounds|desugar|AGP|ViewModel|Exception", re.I)
MAX_BULLETS = 5
 
 
def get_commits(from_tag: str, to_ref: str = "HEAD") -> str:
    r = subprocess.run(
        ["git", "log", f"{from_tag}..{to_ref}", "--no-merges", "--pretty=format:- %s%n%b"],
        capture_output=True, text=True,
    )
    if r.returncode != 0:
        sys.exit(f"git log failed: {r.stderr.strip()}")
    return r.stdout.strip()
 
 
def build_prompt(commits: str, version: str) -> str:
    return (
        f"Below are the commit messages for app v{version}. "
        "Write release notes for the store's What's New field in Japanese (ja) and English (en).\n"
        "Rules:\n"
        f"- Each language is an array of 3 to {MAX_BULLETS} strings\n"
        "- Only changes a user can notice on screen\n"
        "- No class names, library names or exception names\n"
        "- Do not mention anything that is not in the commits\n\n"
        f"Commits:\n{commits}\n"
    )
 
 
def generate(commits: str, version: str) -> dict:
    from google import genai          # pip install google-genai
    from google.genai import types
 
    client = genai.Client()           # reads GEMINI_API_KEY from the environment
    resp = client.models.generate_content(
        model=MODEL,
        contents=build_prompt(commits, version),
        config=types.GenerateContentConfig(
            response_mime_type="application/json",
            response_schema={
                "type": "OBJECT",
                "properties": {
                    "ja": {"type": "ARRAY", "items": {"type": "STRING"}},
                    "en": {"type": "ARRAY", "items": {"type": "STRING"}},
                },
                "required": ["ja", "en"],
            },
        ),
    )
    return json.loads(resp.text)
 
 
def check(notes: dict) -> list[str]:
    problems = []
    for lang in ("ja", "en"):
        items = notes.get(lang, [])
        if not 1 <= len(items) <= MAX_BULLETS:
            problems.append(f"{lang}: {len(items)} bullets")
        for line in items:
            if BANNED.search(line):
                problems.append(f"{lang}: internal term left -> {line}")
    return problems
 
 
if __name__ == "__main__":
    ap = argparse.ArgumentParser()
    ap.add_argument("from_tag")
    ap.add_argument("--version", required=True)
    ap.add_argument("--dry-run", action="store_true")
    a = ap.parse_args()
 
    commits = get_commits(a.from_tag)
    if not commits:
        sys.exit("No commits in range. Check the tag name: git tag -l")
    if a.dry_run:
        print(build_prompt(commits, a.version))
        sys.exit(0)
 
    notes = generate(commits, a.version)
    for p in check(notes):
        print("CHECK:", p, file=sys.stderr)
    for lang in ("ja", "en"):
        print(f"=== {lang} ===")
        print("\n".join(f"・{x}" for x in notes[lang]))

Three design choices matter here.

  1. --dry-run comes first. You see exactly what the model will receive before spending a call. Missing commits and wrong tags show up here.
  2. The shape is enforced by a schema. ja and en are arrays of strings, so you can count bullets before pasting.
  3. A machine checks too. The BANNED pattern holds terms that actually leaked in my own project. Replace them with yours.

Usage:

python release_notes.py v2.0.0 --version 2.1.0 --dry-run
python release_notes.py v2.0.0 --version 2.1.0

This is the --dry-run output from the throwaway repository (two commits):

Below are the commit messages for app v2.1.0. Write release notes for the store's What's New field in Japanese (ja) and English (en).
Rules:
- Each language is an array of 3 to 5 strings
- Only changes a user can notice on screen
- No class names, library names or exception names
- Do not mention anything that is not in the commits

Commits:
- Redesign back button ad gate

- Fix RecyclerView IndexOutOfBoundsException with defensive copy
list crashed on fast scroll

Do not hard-code the model ID

The first version had gemini-2.5-flash in the source. Today I would use an environment variable, because a model can stop working on a date different from the one in a table.

You can check which IDs your own key can see with models.list:

curl -s "https://generativelanguage.googleapis.com/v1beta/models?pageSize=200" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  | grep -o '"name": "models/[^"]*"' | sed 's|.*models/||; s|"$||' | sort

Pick a light, inexpensive Flash-tier model from that list and put it in RELEASE_NOTES_MODEL. As of November 2026, when I reread the official deprecations table, gemini-3.6-flash was listed as the replacement for gemini-2.0-flash. That table changes often, though. Trust the names your own key returns over the names in a table.

If you want to know what happens when you keep calling a retired model, I measured it: Retrying a retired model never showed up in success latency. It is useful when you design retries.

What came out, and what to check before pasting

In May, on about 40 commits from the v2.1.0 cycle, the old SDK with a 2.5-family model produced a draft like this:

• Fixed a rare crash that occurred while browsing wallpapers
• Resolved a display issue on older Android devices
• Improved responsiveness when switching between categories
• Made the home screen slideshow transition more smoothly
• Optimized certain animations

The line to doubt is the last one. "Optimized certain animations" may have no commit behind it, and it tells a user nothing. Find the commit it came from, and delete the line if you cannot. Pasting without checking can promise improvements you never made. That is the reason I keep a human read between the draft and the store.

Troubleshooting table

SymptomLikely causeHow to checkFix
json.loads failsOutput wrapped in a code fence, or an empty responseprint(resp.text) and read the raw stringSet response_mime_type and a schema; do not rely on "JSON only" in the prompt
404 "no longer available"The model you named has been withdrawnDoes models.list show it for this key?Point RELEASE_NOTES_MODEL at an ID from the list
ModuleNotFoundError: google.genaiOnly the legacy package is installed, or it went into another Pythonpython -m pip show google-genaiRun python -m pip install google-genai with the Python that runs the script
git log says unknown revisionWrong tag name, or a shallow clone without tagsgit tag -l; in CI, is fetch-depth: 0 set?Pass the right tag; fetch full history and tags in CI
Only one or two bulletsToo few commits, or only fix / update messagesIs the --dry-run input thin?Pass several releases together; write the reason in the commit
A class name shows up in the outputThe instruction about internal terms is too weakThe "CHECK" lines from check()Add example terms to the prompt; fix by hand when one slips through

Three common misconceptions

"Writing 'JSON only' in the prompt guarantees JSON." It usually works, but it is not a guarantee, and it is exactly what bit me in the first version. If you need the shape guaranteed, constrain it in the configuration. The official reference is Structured outputs.

"Short commits are fine, the model will fill the gaps." What it fills in can be facts that are not in your history. A draft looks good only when the input was careful.

"A Pro model always writes better notes." For this task the difference felt small to me and the price gap was the bigger factor. I did not run a controlled comparison, so if it matters to you, feed the same 40 commits to two models and count how many lines are pasteable.

Manual, semi-automatic or fully automatic

ApproachEffortRiskFits when
Write by hand every timeHigh (over an hour for me)Forgetting thingsA few releases a year, one language
Generate a draft, review it (this post)Low (just the check)LowSeveral languages, a few releases a month
Generate and publish from CILowestUnfounded promises or mistranslations go straight to the storeInternal builds, where a mistake is easy to undo

For store-facing text I pick the middle row. Release notes are a promise that users read after you publish.

The next hurdle: more languages

Once two languages run smoothly, the next wall is the number of languages. When I go beyond two, I find terms stay more consistent if I treat the confirmed Japanese and English as the source and translate in a separate call, rather than asking for everything at once.

Watch the character limits too. Each store limits the What's New field per language, and Google Play's is on the short side. These numbers change, so check the current value in the official help and add a length check to check().

What to do next

Run --dry-run from your last tag to today. The input the model receives mirrors the quality of your own commits. Wherever you think "I could not write notes from this," that is the commit message to improve next time.

After that, call the API once on a short tag range. That is the order I plan to follow on my next release.

Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

◈ API / SDK2026-05-18
Building Automatic Wallpaper Category Classification with Gemini Vision
An indie developer shares how they implemented automatic wallpaper image classification with the Gemini Vision API — including accuracy results, real pitfalls, structured-output tips, and a cost comparison with GPT-4o Vision.
◈ API / SDK2026-05-18
Gemini API asyncio Patterns for Production: How I Cut Processing Time by 80% in My Indie App Backend
A hands-on report on integrating Gemini API asyncio into a production backend. Covers Semaphore-based rate limiting, exponential backoff, partial failure handling, and what breaks when you move the same pipeline to the current google-genai SDK.
◈ API / SDK2026-05-16
Automating App Store and Google Play Review Replies with Gemini API — The 8-Second Rule I Discovered the Hard Way
A practical implementation record of automating multilingual app review replies using Gemini API, based on managing my own app portfolio. Covers the undocumented 8-second wait rule that Apple's API silently enforces.