Skip to content

Conversation

@lahirumaramba
Copy link
Member

@lahirumaramba lahirumaramba commented Dec 11, 2025

Updated the default branch name to main where it was used in the scripts.

If you have a local clone, you can update it by running the following commands:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

@gemini-code-assist
Copy link

Summary of Changes

Hello @lahirumaramba, 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 systematically updates references to the default branch from master to main throughout the repository. This ensures consistency with modern branching practices and prevents issues in automated workflows and contributor guidance that previously relied on the master branch name.

Highlights

  • Default Branch Reference Update: Updated all instances of the master branch name to main across various scripts and documentation to align with the new default branch naming convention.
  • CI/CD Script Adjustment: Modified the publish_preflight_check.sh script to fetch from the main branch instead of master during preflight checks.
  • Contribution Guidelines Update: Revised the CONTRIBUTING.md file to direct new pull requests to the main branch.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/release.yml
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.

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 updates the default branch name from master to main in a script and a documentation file. The changes are correct and achieve the goal of the PR. I've added a couple of suggestions to make these changes more maintainable and robust against future branch name changes.

Comment on lines +149 to +150
echo_info "---< git fetch origin main --prune --unshallow >---"
git fetch origin main --prune --unshallow

Choose a reason for hiding this comment

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

medium

For better maintainability, it's a good practice to use a variable for the branch name instead of hardcoding it. This makes it easier to update in one place if the default branch name changes again in the future. You can use shell parameter expansion to provide a default value, which makes the script more robust.

Suggested change
echo_info "---< git fetch origin main --prune --unshallow >---"
git fetch origin main --prune --unshallow
echo_info "---< git fetch origin ${DEFAULT_BRANCH:-main} --prune --unshallow >---"
git fetch origin ${DEFAULT_BRANCH:-main} --prune --unshallow


Sweet, we'd love to accept your contribution!
[Open a new pull request](https://github.com/firebase/firebase-admin-node/pull/new/master) and fill
[Open a new pull request](https://github.com/firebase/firebase-admin-node/pull/new/main) and fill

Choose a reason for hiding this comment

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

medium

To make this link more robust and avoid hardcoding the default branch name, you can use a URL that automatically targets the default branch for new pull requests. This prevents the need for future updates if the default branch name changes again.

Suggested change
[Open a new pull request](https://github.com/firebase/firebase-admin-node/pull/new/main) and fill
[Open a new pull request](https://github.com/firebase/firebase-admin-node/pull/new) and fill

Copy link
Contributor

@jonathanedey jonathanedey left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!

@lahirumaramba lahirumaramba merged commit 255851b into main Dec 12, 2025
10 checks passed
@lahirumaramba lahirumaramba deleted the lm-renameto-main branch December 12, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:stage Stage a release candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants