Skip to content

Updated git hook script and the make target to set up repository#433

Merged
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:core/setup-target
Dec 25, 2025
Merged

Updated git hook script and the make target to set up repository#433
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:core/setup-target

Conversation

@kyasbal

@kyasbal kyasbal commented Dec 24, 2025

Copy link
Copy Markdown
Member

This PR updates the makefile and scripts to install git hook. Developers can set this repository up just with make setup to install git hooks, install npm dependencies and generating the auto generated code. The update of git hook script also supports working set created as git worktree.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @kyasbal, 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 significantly refactors the project's git hook management to enhance compatibility with git worktree setups and streamline the developer onboarding process. It introduces a consolidated make setup command for initial project configuration, which now includes the automated installation of pre-commit hooks. The logic for these pre-commit checks has been centralized into a dedicated Makefile, promoting consistent code quality enforcement across the repository.

Highlights

  • Git Worktree Compatibility: The git hook setup has been updated to correctly identify the .git/hooks directory using git rev-parse --git-path hooks, ensuring compatibility with git worktree environments.
  • Centralized Pre-commit Logic: The actual pre-commit checks, including license header addition, code formatting, and linting, have been moved into a new scripts/make/hooks.mk file and are now executed via a make pre-commit command.
  • Simplified Development Setup: A new make setup target has been introduced to automate the initial project setup, which now includes installing npm packages, building web and Go components, and configuring the git hooks.
  • Updated Documentation: The README.md and development guides (both English and Japanese) have been revised to reflect the new make setup command and provide clearer explanations of the git hook functionality.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 updates the git hook setup to make it compatible with git worktree environments by dynamically creating the pre-commit hook. The logic for the pre-commit checks is also centralized in a new Makefile include. The changes are well-structured and the accompanying documentation updates are clear. I have a couple of suggestions to enhance the robustness and efficiency of the new scripts, primarily concerning filename handling and script execution in the Makefile.

Comment thread scripts/make/hooks.mk
Comment thread Makefile Outdated
@kyasbal kyasbal changed the title Updated git hook script to make it ready used in git worktree env Updated git hook script and the make target to set up repository Dec 24, 2025
@kyasbal kyasbal added the cicd label Dec 24, 2025
@kyasbal kyasbal marked this pull request as ready for review December 24, 2025 23:37
@kyasbal kyasbal merged commit e1ea9fb into GoogleCloudPlatform:main Dec 25, 2025
8 of 9 checks passed
@kyasbal kyasbal deleted the core/setup-target branch December 25, 2025 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants