Cannot open PR: null review comment commit causes TypeError (reading 'oid')

Aperta Adatta ai principianti
#9,159 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, typescript, vscode
Ambito
devtools

Direzione di ricerca

Inizia in src/github/utils.ts, in parseGraphQLComment, dove l’issue identifica comment.commit.oid come l’accesso che non funziona. Controlla come la risposta GraphQL rappresenta i commenti con un commit null e rivedi i test di parsing vicini. Gestisci questo caso in modo che l’apertura della pull request non generi più un errore, poi verificalo con un test che copra un commit null.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Environment

GitHub Pull Requests 0.174.0; VS Code 1.144.0 x64; Linux; GitHub.com.

Reproduction

With the extension installed and signed in to GitHub, run:

git clone --filter=blob:none --branch ranges_chunk https://github.com/shyeyian/clang.git clang-pr-171234 &&
cd clang-pr-171234 &&
git remote add upstream https://github.com/llvm/llvm-project.git &&
git fetch --filter=blob:none upstream main &&
git config branch.ranges_chunk.github-pr-owner-number 'llvm#llvm-project#171234' &&
code .

Click the GitHub Pull Requests activity-bar icon. In Changes in Pull Request #171234, click the header action View Pull Request Description.

Image

PR contents fail to load normally. The GitHub Pull Request output channel shows:

branch ranges_chunk. Repo: llvm/llvm-project PR: 171234
2026-11-04 16:06:57.386 [info] [PullRequestGitHelper] associate ranges_chunk with Pull Request #171234
2026-11-04 16:06:57.394 [info] [Review+0] Found matching pull request metadata for current branch ranges_chunk. Repo: llvm/llvm-project PR: 171234
2026-11-04 16:06:57.394 [info] [Review+0] current branch ranges_chunk is associated with pull request #171234
2026-11-04 16:06:57.394 [info] [Review+0] Resolving pull request
2026-11-04 16:07:03.093 [info] [GitHubRepository+0.1] Fetch branch main - enter
2026-11-04 16:07:04.321 [info] [GitHubRepository+0.1] Fetch branch main - done: true
2026-11-04 16:07:04.329 [info] [Review+0] Resolved PR #171234, state is OPEN
2026-11-04 16:07:04.329 [info] [Review+0] Fetching pull request data
2026-11-04 16:07:04.329 [info] [PullRequestTree] Adding PR #171234 to tree
2026-11-04 16:07:04.349 [info] [Review+0] Register comments provider
2026-11-04 16:07:04.349 [info] [Review+0] Register in memory content provider
2026-11-04 16:07:07.281 [info] [Review+0] Display pull request status bar indicator.
2026-11-04 16:07:07.281 [info] [Review+0] Using focus mode = true.
2026-11-04 16:07:07.281 [info] [Review+0] State validation silent = true.
2026-11-04 16:07:07.281 [info] [Review+0] PR show should show = false.
2026-11-04 16:07:18.702 [error] [Review+0] Failed to initialize PR data TypeError: Cannot read properties of null (reading 'oid'): Cannot read properties of null (reading 'oid')
2026-11-04 16:08:03.163 [info] [PullRequestTree] Creating file and commit nodes for PR #171234
2026-11-04 16:08:03.164 [info] [PullRequestTree] Getting children for Files node
2026-11-04 16:08:03.164 [info] [PullRequestTree] Got all children for Files node
2026-11-04 16:08:13.623 [info] [FolderRepositoryManager+0] Using in-memory cached assignable users.
2026-11-04 16:08:29.564 [error] [PullRequestOverviewPanel] Failed to update deferred timeline: Cannot read properties of null (reading 'oid')
Failing Source

src/github/utils.ts, line 648, parseGraphQLComment: commitId: comment.commit.oid throws when comment.commit is null. GraphQL currently returns null commits for 33 comments in this PR, including this comment.

Lingua principale
TypeScript
Stelle
2.6k
Fork
811
Merge medio
1g 9h
PR unite (30g)
69

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/vscode-pull-request-github

Tutte le issue di microsoft/vscode-pull-request-github

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.