Skip to content

feat(tool/looker): git_branch tools for looker.#2718

Open
drstrangelooker wants to merge 1 commit intomainfrom
looker-git-branch
Open

feat(tool/looker): git_branch tools for looker.#2718
drstrangelooker wants to merge 1 commit intomainfrom
looker-git-branch

Conversation

@drstrangelooker
Copy link
Contributor

Description

This tool is used to fetch and manipulate the git branch of a LookML project.

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

🛠️ Fixes #2678

@drstrangelooker drstrangelooker self-assigned this Mar 11, 2026
@drstrangelooker drstrangelooker requested review from a team as code owners March 11, 2026 19:28
@drstrangelooker drstrangelooker added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Mar 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 introduces a significant enhancement to the Looker toolset by adding a new project_git_branch tool. This tool empowers users to programmatically manage Git branches within their LookML projects, enabling operations such as listing, retrieving, creating, switching, and deleting branches. This addition streamlines development workflows by providing direct control over project versioning within the Looker environment.

Highlights

  • New Looker Git Branch Tool: Introduced a new tool, lookergitbranch, designed to manage Git branches within LookML projects.
  • Comprehensive Git Operations: The tool supports list, get, create, switch, and delete operations for LookML project branches.
  • Toolset Integration: The new project_git_branch tool has been integrated into the looker_dev_tools toolset.
  • Documentation: Dedicated documentation for the looker-git-branch tool has been added, including usage examples and parameter details.
  • Testing: Unit and integration tests were added to ensure the correct functionality and configuration parsing of the new tool.
Changelog
  • cmd/internal/imports.go
    • Imported the new lookergitbranch package.
  • cmd/internal/tools_file_test.go
    • Updated the looker_dev_tools toolset definition to include project_git_branch.
  • docs/en/reference/prebuilt-tools.md
    • Added a reference entry for the project_git_branch tool.
  • docs/en/resources/tools/looker/looker-git-branch.md
    • Created a new documentation page for the looker-git-branch tool.
  • internal/prebuiltconfigs/tools/looker-dev.yaml
    • Defined the project_git_branch tool configuration.
    • Added the project_git_branch tool to the looker_dev_tools toolset.
  • internal/tools/looker/lookergitbranch/lookergitbranch.go
    • Implemented the core logic for the looker-git-branch tool, handling various Git branch operations.
  • internal/tools/looker/lookergitbranch/lookergitbranch_test.go
    • Added unit tests for the looker-git-branch tool's configuration parsing.
  • tests/looker/looker_integration_test.go
    • Extended integration tests to cover the functionality of the project_git_branch tool.
Activity
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
Contributor

@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 introduces a new project_git_branch tool for Looker, enabling git branch manipulation for LookML projects. The implementation is mostly solid, with corresponding changes in documentation, prebuilt configurations, and integration tests. However, there are a few areas for improvement. The core logic in the new tool lacks unit tests, which is a significant gap. There's also a documentation inaccuracy for one of the tool's parameters and some redundant code that goes against project conventions. Addressing these points will improve the correctness and maintainability of the new tool.

@drstrangelooker drstrangelooker force-pushed the looker-git-branch branch 2 times, most recently from 29f82b3 to 7302a95 Compare March 11, 2026 19:35
@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Moderately-important priority. Fix may not be included in next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add git branch management tools for Looker LookML projects

1 participant