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

Offen Anfängerfreundlich
#9,159 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
github, typescript, vscode
Bereich
devtools

Rechercherichtung

Beginne in src/github/utils.ts bei parseGraphQLComment, wo der Issue comment.commit.oid als fehlerhaften Zugriff identifiziert. Prüfe, wie die GraphQL-Antwort Kommentare mit einem null-Commit darstellt, und sieh dir die Parsing-Tests in der Nähe an. Behandle diesen Fall, damit beim Öffnen des Pull Requests kein Fehler mehr auftritt, und überprüfe das mit einem Test für einen null-Commit.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
2.6k
Forks
811
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
69

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/vscode-pull-request-github

Alle Issues in microsoft/vscode-pull-request-github

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.