Skip to content

Switch all googleapis python repos to use a default branch of main #10579

Closed
@parthea

Description

@parthea

Please follow these steps to change the default branch from master to main:

  1. Before you start the migration add your Github user to the end of the list item to avoid overlapping efforts.
  2. In the majority of python repositories, @googleapis/yoshi-python is listed as the code owner in .github/CODEOWNERS. If there are additional code owners listed, please reach out to the team listed to notify them about the effort.
  3. In the “Settings” section for the Github repository, rename the default branch from master to main. If you don’t see the settings section, you will need to reach out to an admin of the repository to complete this step. Once you’re in the settings section, look for the “Default branch” section under the branches tab. For example, for python-datastream, the link to the branches tab is https://github.com/googleapis/python-datastream/settings/branches
  4. Search the github repo for the term master in the repository. Open a PR in the repo to replace the term master with main. We have automation which will revert changes made to templated files so we also need to add replacements in owlbot.py to replace master with main similar to this PR. See this bash script that I used to create the branch for the linked PR. Note: Once this synthtool PR is merged and the synthtool templates have propagated to the repo via owlbot, we can remove the replacements in owlbot.py added in this step.
  5. Make sure that replacements are not reverted by owlbot
  6. Notify a Googler to complete the remaining steps at go/python-main-branch-migration.
  7. Check the box below when the repo has been successfully migrated and verified that the continuous/nightly builds pass after the migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: processA process-related concern. May include testing, release, or the like.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions