Skip to content

all_git_branches() returns empty owner_name for personal branches #1663

Open

Description

@roanny

Summary

sdk.all_git_branches(project_id) returns owner_name: "" (empty string) for personal branches where personal: True, while sdk.git_branch(project_id) correctly returns the owner's full name for the same branch.

Expected behavior

all_git_branches() should populate owner_name for personal branches, matching the behavior of git_branch().

Reproduction

SDK: looker-sdk v26.4.0 (Python)
Looker: Google Cloud core 26.2
Python: 3.13.3

import looker_sdk

sdk = looker_sdk.init40()

# Enable dev mode
sdk.update_session(looker_sdk.models40.WriteApiSession(workspace_id="dev"))

# List all branches — owner_name is empty for personal branches
branches = sdk.all_git_branches("my_project")
for b in branches:
    if b.personal:
        print(f"all_git_branches: name={b.name}, personal={b.personal}, owner_name={b.owner_name!r}")
        # Output: all_git_branches: name=dev-user-xxxx, personal=True, owner_name=''

# Get current branch — owner_name is populated
current = sdk.git_branch("my_project")
print(f"git_branch: name={current.name}, personal={current.personal}, owner_name={current.owner_name!r}")
# Output: git_branch: name=dev-user-xxxx, personal=True, owner_name='FULL NAME'

Actual results

Method personal owner_name
sdk.all_git_branches() True '' (empty)
sdk.git_branch() True 'FULL NAME'

Impact

Consumers of all_git_branches() cannot identify who owns each personal branch without making an additional git_branch() call per branch (by switching to each one). This affects tools that display branch listings with ownership information.

Environment

  • SDK: looker-sdk 26.4.0 (Python, pip)
  • API version: 4.0
  • Looker instance: Google Cloud core 26.2
  • OS: macOS (darwin/arm64)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    need triagep3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions