Skip to content

Use lower-case base32 for PR IDs#292

Merged
joshlf merged 1 commit intomainfrom
G5scphwsfjzp74evnhrrrvr4o5txpwut6
Feb 10, 2026
Merged

Use lower-case base32 for PR IDs#292
joshlf merged 1 commit intomainfrom
G5scphwsfjzp74evnhrrrvr4o5txpwut6

Conversation

@joshlf
Copy link
Owner

@joshlf joshlf commented Feb 10, 2026

Makes progress on #287


Latest Update: v3 — Compare vs v2

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v2 v1 Base
v3 vs v2 vs v1 vs Base
v2 vs v1 vs Base
v1 vs Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/G5scphwsfjzp74evnhrrrvr4o5txpwut6 && git checkout -b pr-G5scphwsfjzp74evnhrrrvr4o5txpwut6 FETCH_HEAD

Checkout

git fetch origin refs/heads/G5scphwsfjzp74evnhrrrvr4o5txpwut6 && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/G5scphwsfjzp74evnhrrrvr4o5txpwut6 && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/G5scphwsfjzp74evnhrrrvr4o5txpwut6

Stacked PRs enabled by GHerrit.

@gemini-code-assist
Copy link

Summary of Changes

Hello @joshlf, 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 standardizes the format of Gerrit PR IDs by ensuring they are generated using lowercase base32 encoding. This change promotes consistency in ID representation across the system and updates related tests and regex patterns to reflect the new format.

Highlights

  • PR ID Format Change: The pull request updates the generation of Gerrit PR IDs to use lowercase base32 encoding instead of uppercase.
  • Test Updates: Existing tests for base32 format compliance have been adjusted to assert that PR IDs now contain lowercase characters (a-z) and digits (2-7) after the initial 'G'.
  • Regex Adaption: The regex used for detecting Gerrit PR IDs in test utilities has been made case-insensitive for the leading 'G' character to accommodate potential variations.
Changelog
  • src/commit_msg.rs
    • Changed the base32 encoding of PR IDs to convert the result to ASCII lowercase.
  • tests/migration_edge_cases.rs
    • Updated the test_base32_format_compliance function to assert that PR ID content (after the 'G' prefix) consists of lowercase letters or digits 2-7, and explicitly checks for no uppercase characters.
  • testutil/src/lib.rs
    • Modified the GHERRIT_ID_REGEX to match both 'G' and 'g' as the initial character of a Gerrit PR ID, making the regex more flexible.
Activity
  • The pull request description indicates it was automatically generated by GHerrit.
  • No human comments or reviews are visible in the provided context.
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.

@joshlf joshlf force-pushed the G5scphwsfjzp74evnhrrrvr4o5txpwut6 branch from d94168f to ffe3bdc Compare February 10, 2026 04:33
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 successfully transitions the PR ID generation to use lower-case base32 encoding, which improves consistency. The core logic change in src/commit_msg.rs is correct, and the test updates in tests/migration_edge_cases.rs not only reflect this change but also improve the validation logic. I have one suggestion to make the test code slightly more concise by removing a redundant check.

Makes progress on #287

gherrit-pr-id: G5scphwsfjzp74evnhrrrvr4o5txpwut6
@joshlf joshlf force-pushed the G5scphwsfjzp74evnhrrrvr4o5txpwut6 branch from ffe3bdc to 744da9b Compare February 10, 2026 04:40
@joshlf joshlf enabled auto-merge (squash) February 10, 2026 04:41
@joshlf joshlf merged commit 639fccf into main Feb 10, 2026
1 check passed
@joshlf joshlf deleted the G5scphwsfjzp74evnhrrrvr4o5txpwut6 branch February 10, 2026 04:42
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.

1 participant