Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: claude-code hooks in settings.json shall not contain absolute paths to the repo

オープン
#558 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 14 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
git, python, shell

調査の方向性

Start at the implementation of code-review-graph install --platform claude-code and inspect how it generates .claude/settings.json and handles hooks already installed by older versions. Run the install command in a temporary repository, then verify the generated commands discover the repository at runtime and that repeated installation replaces rather than duplicates the hooks.

索引モデルが issue の本文から書いたものです。

説明

bug platform-support
code-review-graph version

Built on branch: main Built at commit: 06161b4f7f55

Operating system

Linux

Python version

3.12.3

AI platform

claude-code

Output of code-review-graph status
Nodes: 420
Edges: 2936
Files: 91
Languages: cpp, python
Last updated: 2026-06-14T02:42:17
Built on branch: main
Built at commit: 06161b4f7f55
Steps to reproduce

code-review-graph install --platform claude-code

Expected vs actual behavior

Expected:
.claude/settings.json is a repository level file impacying all collaborators on the repository, as such it should not contain user level aspects, such as paths to the repo

Actual: PostToolUse and SessionStart both contains a hard coded absolute path to the repo, making it not possible to share settings.json with other users/setups

Example:

     {
        "matcher": "Edit|Write|Bash",
        "hooks": [
          {
            "type": "command",
            "command": "cat >/dev/null || true; git rev-parse --git-dir >/dev/null 2>&1 && code-review-graph update --skip-flows --repo \"/home/username/work/some/path/to/depot\" || true",
            "timeout": 30
          }
        ]
      }

Further to that, the install command will not replace existing hooks installed by previous versions of the tool, but add to the list instead

Additional context

Here is a possible rewrite of the PostToolUse. The path to the depot is captured on the fly in a variable and used for the tool invocation

            "command": "repo_root=$(git rev-parse --show-toplevel 2>/dev/null) && [ -n \"$repo_root\" ] && code-review-graph update --skip-flows --repo \"$repo_root\" || true",
主要言語
Python
スター
31.9k
フォーク
2.9k
平均マージ
9日 13時間
マージ済み PR(30日)
10

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tirth8205/code-review-graph のほかの issue

tirth8205/code-review-graph の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。