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

Open Beginner friendly
#9,159 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github, typescript, vscode
Domain
devtools

Research direction

Start in src/github/utils.ts at parseGraphQLComment, where the issue identifies comment.commit.oid as the failing access. Check how the GraphQL response represents comments with a null commit and review nearby parsing tests. Handle that case so opening the pull request no longer throws, then verify with a test covering a null commit.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
2.6k
Forks
811
Avg merge
1d 9h
Merged PRs (30d)
69

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-pull-request-github

All issues in microsoft/vscode-pull-request-github

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.