Skip to content

librarian: document operating on a local clone of repo creates pr against main #2877

@zhumin8

Description

@zhumin8

When operating on a local clone of repo and not on the main branch, for example:

navigate to google-cloud-python and create a test branch, then run:

LIBRARIAN_GITHUB_TOKEN=$(gh auth token) librarian generate -api=google/cloud/hypercomputecluster/v1beta -library=google-cloud-hypercomputecluster -push

It's branch is ignored, and eventually raises a PR against main branch. see comment

I think the desired behavior should be creating PR against test branch, equivalent to providing -branch=test when letting Librarian fetch repo from remote.

To fix, we likely want to check the current branch if opening a repo from dir and set branch accordingly.

Or, alternatively if we don't want to support branches on local repo dirs, then we should document and add a check to fail early.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions