all_git_branches() returns empty owner_name for personal branches

Open
#1,663 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start at the generated Python SDK entry points for all_git_branches() and git_branch(), comparing how each represents personal branches and owner_name. Reproduce the issue with the provided calls, then verify that all_git_branches() returns the owner's full name for personal branches without requiring a separate branch switch.

Written by the indexing model from the issue text.

Description

need triage p3

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)
Dominant language
TypeScript
Stars
272
Forks
203
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from looker-open-source/sdk-codegen

All issues in looker-open-source/sdk-codegen

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.