Skip to content

Release 1.2.0#181

Merged
horgh merged 7 commits intomainfrom
greg/eng-3843
Jan 15, 2026
Merged

Release 1.2.0#181
horgh merged 7 commits intomainfrom
greg/eng-3843

Conversation

@oschwald
Copy link
Member

  • Set release date
  • Add release script

oschwald and others added 2 commits January 14, 2026 13:24
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @oschwald, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the release management workflow by introducing automation and ensuring proper versioning. It sets the stage for a more streamlined and less error-prone release cycle, making it easier to publish new versions and maintain accurate release notes.

Highlights

  • Changelog Update: The CHANGELOG.md file has been updated to include the specific release date (2026-01-14) for version 1.2.0.
  • Automated Release Script: A new bash script, dev-bin/release.sh, has been added to automate the release process. This script extracts release information from the changelog, performs pre-release checks, and facilitates creating a GitHub release.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

Modver result

This report was generated by Modver,
a Go package and command that helps you obey semantic versioning rules in your Go module.

This PR does not require a change in your module’s version number.
(You might still consider bumping the patchlevel anyway.)

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a release date to the changelog and introduces a new release script. The release script is a great addition for automating the release process. I've provided a few suggestions to improve its robustness, maintainability, and user experience. These include ensuring the script runs from the repository root, checking for dependencies, avoiding duplicated code, and making the GitHub release creation more robust.


git push

gh release create --target "$(git branch --show-current)" -t "$version" -n "$notes" "$tag"

Choose a reason for hiding this comment

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

high

Passing release notes via -n "$notes" can be fragile if the notes contain special characters that the shell might interpret. The gh release create command provides a --notes-file (or -F) option to read notes from a file, which is more robust.

Additionally, git branch --show-current was added in Git 2.22. For better portability with older Git versions, you could use git rev-parse --abbrev-ref HEAD.

Suggested change
gh release create --target "$(git branch --show-current)" -t "$version" -n "$notes" "$tag"
notes_file=$(mktemp)
trap 'rm -f "$notes_file"' EXIT
echo "$notes" > "$notes_file"
gh release create --target "$(git rev-parse --abbrev-ref HEAD)" -t "$version" -F "$notes_file" "$tag"

Comment on lines 3 to 5
set -eu -o pipefail

changelog=$(cat CHANGELOG.md)

Choose a reason for hiding this comment

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

medium

The script currently assumes it's run from the repository root and that the gh CLI tool is installed. It's good practice to make scripts more robust by explicitly handling these assumptions.

I suggest adding checks at the beginning of the script:

  1. Change to the repository root directory to ensure file paths like CHANGELOG.md resolve correctly regardless of where the script is invoked from.
  2. Check for the presence of the gh command and exit gracefully if it's not found.
Suggested change
set -eu -o pipefail
changelog=$(cat CHANGELOG.md)
set -eu -o pipefail
cd "$(git rev-parse --show-toplevel)"
if ! command -v gh > /dev/null; then
echo "The 'gh' CLI is not installed. Please install it to continue." >&2
exit 1
fi
changelog=$(cat CHANGELOG.md)

Comment on lines 7 to 21
regex='
## ([0-9]+\.[0-9]+\.[0-9]+(-[^ ]+)?) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)

((.|
)*)
'

if [[ ! $changelog =~ $regex ]]; then
echo "Could not find date line in change log!"
exit 1
fi

version="${BASH_REMATCH[1]}"
date="${BASH_REMATCH[3]}"
notes="$(echo "${BASH_REMATCH[4]}" | sed -n -E '/^## [0-9]+\.[0-9]+\.[0-9]+(-[^ ]+)?/,$!p')"

Choose a reason for hiding this comment

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

medium

To improve maintainability and avoid duplicating the version matching logic, you can define the version regex in a variable and reuse it for both parsing the changelog and extracting the release notes with sed. This way, if the version format ever changes, you only need to update it in one place.

Suggested change
regex='
## ([0-9]+\.[0-9]+\.[0-9]+(-[^ ]+)?) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
((.|
)*)
'
if [[ ! $changelog =~ $regex ]]; then
echo "Could not find date line in change log!"
exit 1
fi
version="${BASH_REMATCH[1]}"
date="${BASH_REMATCH[3]}"
notes="$(echo "${BASH_REMATCH[4]}" | sed -n -E '/^## [0-9]+\.[0-9]+\.[0-9]+(-[^ ]+)?/,$!p')"
version_regex_part='[0-9]+\.[0-9]+\.[0-9]+(-[^ ]+)?'
regex="
## ($version_regex_part) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
((.|
)*)
"
if [[ ! $changelog =~ $regex ]]; then
echo "Could not find date line in change log!"
exit 1
fi
version="${BASH_REMATCH[1]}"
date="${BASH_REMATCH[3]}"
notes="$(echo "${BASH_REMATCH[4]}" | sed -n -E "/^## $version_regex_part/,\$!p")"

Comment on lines 40 to 45
read -e -p "Push to origin? " should_push

if [ "$should_push" != "y" ]; then
echo "Aborting"
exit 1
fi

Choose a reason for hiding this comment

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

medium

The confirmation prompt only accepts a lowercase 'y'. This can be made more user-friendly by accepting 'Y' as well and by indicating the expected input in the prompt (e.g., [y/N]). Using a regex match for confirmation would improve the user experience.

Suggested change
read -e -p "Push to origin? " should_push
if [ "$should_push" != "y" ]; then
echo "Aborting"
exit 1
fi
read -e -p "Push to origin? [y/N] " should_push
if ! [[ "$should_push" =~ ^[Yy]$ ]]; then
echo "Aborting"
exit 1
fi

oschwald and others added 5 commits January 14, 2026 13:49
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Ensures the script works correctly regardless of which directory
it's invoked from.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Avoids duplicating the version pattern between the main regex and
the sed command.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Avoids shell interpretation issues with special characters in
release notes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@horgh horgh merged commit 152b400 into main Jan 15, 2026
13 checks passed
@horgh horgh deleted the greg/eng-3843 branch January 15, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants