annotate shows the launch directory's repo, not the file's
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- git, typescript
- 領域
- cli
調査の方向性
packages/server/repo.ts を読み、getRepoInfo() が process.cwd() にフォールバックする仕組みを確認してから、packages/server/annotate.ts と apps/pi-extension/server/serverAnnotate.ts にある呼び出し箇所を調べてください。対象パスとして、単一ファイルの場合はそのファイルのディレクトリ、フォルダの場合はそのフォルダ、複数ファイルの場合はバンドルの共通ルートを渡してください。URL と annotate-last の場合は起動ディレクトリのままにします。対象が起動ディレクトリのリポジトリの外にあるケースのテストを追加し、リポジトリチップ、ブランチチップ、タブのサフィックスが対象のリポジトリを表示することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
plannotator annotate takes the repo and branch it shows from the directory the command runs
in, not from the repo that holds the file. When an agent launches a review from a different
directory than the document's, the repo chip, the branch chip and the tab title's repo suffix
(#2061) all name the wrong repository.
Repro
Two repos, one nested in the other (a docs repo holding a code checkout, git-ignored):
~/work/payments-docs/ # repo acme/payments-docs, branch main
~/work/payments-docs/payments/ # repo acme/payments, branch feat/refunds
cd ~/work/payments-docs/payments
plannotator annotate ../specs/refunds.md
- Expected:
acme/payments-docsandmain, the repo and branch ofrefunds.md. - Actual:
acme/paymentsandfeat/refunds. The tab readsrefunds.md · acme/payments.
Nesting isn't required. Any launch from outside the file's repo shows the launch directory's repo,
and a file outside any repo gets the launch directory's repo too.
Cause
packages/server/annotate.ts calls getRepoInfo() with no argument, so it falls back to
process.cwd() (packages/server/repo.ts). The Pi extension does the same in
apps/pi-extension/server/serverAnnotate.ts. Code review already passes its git context's
cwd, so it isn't affected.
Suggestion
Resolve the repo from the target when there is one on disk:
- One file: the file's directory.
- A folder: the folder.
- Several files: the common root the bundle already computes.
- A URL or
annotate-last: keep the launch directory, as today.
The change is one argument at each call site, plus a test with the target outside the launch
directory's repo. Happy to send the PR.
- 主要言語
- TypeScript
- スター
- 8.7k
- フォーク
- 649
- 平均マージ
- 11時間 16分
- マージ済み PR(30日)
- 585
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
backnotprop/plannotator のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
backnotprop/plannotator#2372 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
backnotprop/plannotator#2317 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
backnotprop/plannotator#2243 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Annotate documentation omits per-file version history and privacy controls再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
backnotprop/plannotator#1086 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
backnotprop/plannotator#2373 ·
メンテナーはふだん 1 日以内に返信
backnotprop/plannotator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Automattic/data-liberation-agent#1115 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
CSS enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pychess/pychess-variants#2448 ·
メンテナーはふだん 1 日以内に返信
-
[architect] Stale planning/scratch files at repo root (COMPONENT_SPLIT_SUMMARY.md etc.) describe already-completed work対応中かも @hivecommons-hive が今日担当しました。 オープンagent/architect architecture help wanted stage/040-covered-by-pr tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
kubestellar/console#24716 ·
メンテナーはふだん 1 日以内に返信
-
helm-knative-apply.sh fails with Helm 4対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea: triage theme: undefined
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
jhipster/generator-jhipster#35895 ·
メンテナーはふだん 1 日以内に返信