Skip to content

Conversation

@taeold
Copy link
Contributor

@taeold taeold commented Nov 5, 2025

Allows 'prerelease' as a version argument to increment RC versions. Ensures that the version bump commit and tag are pushed to GitHub even for pre-releases, preventing subsequent runs from attempting to publish the same version.

The current release "fails" to create a second prerelease 😢

Allows 'prerelease' as a version argument to increment RC versions. Ensures that the version bump commit and tag are pushed to GitHub even for pre-releases, preventing subsequent runs from attempting to publish the same version.
Manually updated package.json to 7.0.0-rc.0 to match npm. Updated publish.sh to correctly handle prerelease argument and push commits.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @taeold, 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 resolves a critical issue in the release process where prerelease versions were not being handled correctly, leading to failures in subsequent publishing attempts. The changes enable the publish.sh script to properly increment release candidate versions and ensure that all version-related Git commits and tags are pushed to GitHub, thereby streamlining the prerelease workflow and improving release reliability.

Highlights

  • Prerelease Versioning Support: The publish.sh script now officially supports 'prerelease' as a valid argument for version bumping, enabling proper incrementing of release candidate versions.
  • Enhanced npm version Logic: The script's internal logic for the npm version command has been updated to correctly handle 'prerelease' arguments, specifically using npm version prerelease --preid=rc for release candidates.
  • Automated Git Push for Prereleases: After publishing to npm, the script now explicitly pushes the version bump commit and its associated tag to GitHub, ensuring that prerelease changes are properly recorded and preventing future publishing conflicts.
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.

@taeold taeold enabled auto-merge November 5, 2025 23:07
Copy link
Contributor

@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 successfully adds support for 'prerelease' versioning and ensures that version bumps for pre-releases are pushed to GitHub, which resolves the issue described. The logic for handling the new 'prerelease' argument is sound. I have one suggestion to refactor the publishing script to improve maintainability by removing a duplicated command.

Comment on lines +125 to 131
echo "Pushing to GitHub..."
git push origin master --tags
echo "Pushed to GitHub."

if [[ $PRE_RELEASE != "" ]]; then
echo "Published a pre-release version. Skipping post-release actions."
exit
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While adding the git push here correctly pushes pre-release tags, it introduces a code duplication issue. For a full release, git push origin master --tags is now called twice: once here, and once again on line 147 after the changelog is cleaned up. This results in an extra, unnecessary push operation for full releases.

To improve this, you can move the push logic inside the if [[ $PRE_RELEASE != "" ]] block. This ensures the push only happens once at the correct time for both pre-releases and full releases, making the script cleaner and more efficient.

Suggested change
echo "Pushing to GitHub..."
git push origin master --tags
echo "Pushed to GitHub."
if [[ $PRE_RELEASE != "" ]]; then
echo "Published a pre-release version. Skipping post-release actions."
exit
if [[ $PRE_RELEASE != "" ]]; then
echo "Pushing to GitHub..."
git push origin master --tags
echo "Pushed to GitHub."
echo "Published a pre-release version. Skipping post-release actions."
exit
fi

Copy link

@brittanycho brittanycho left a comment

Choose a reason for hiding this comment

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

wdyt of the gemini-code-assist comments (re: git push)?

@taeold taeold added this pull request to the merge queue Nov 5, 2025
Merged via the queue into master with commit 2a73d4b Nov 5, 2025
32 checks passed
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants