Skip to content

Sometimes cross-ref event is missing source#8408

Merged
alexr00 merged 1 commit intomainfrom
alexr00/spotless-viper
Jan 21, 2026
Merged

Sometimes cross-ref event is missing source#8408
alexr00 merged 1 commit intomainfrom
alexr00/spotless-viper

Conversation

@alexr00
Copy link
Copy Markdown
Member

@alexr00 alexr00 commented Jan 21, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 21, 2026 13:57
@alexr00 alexr00 enabled auto-merge (squash) January 21, 2026 13:57
@alexr00 alexr00 self-assigned this Jan 21, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where cross-referenced events from the GitHub API can sometimes be missing the source field, which would cause runtime errors when the code attempted to access properties of the undefined source. The fix makes the source field optional in the GraphQL interface and adds a guard clause to skip processing when source is missing.

Changes:

  • Made the source field optional in the GraphQL CrossReferencedEvent interface
  • Added null check in parseCombinedTimelineEvents to skip cross-referenced events without a source

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/github/graphql.ts Updated CrossReferencedEvent interface to make source field optional
src/github/utils.ts Added guard clause to skip processing cross-referenced events when source is undefined

Comment thread src/github/utils.ts
@alexr00 alexr00 merged commit 14d0c26 into main Jan 21, 2026
12 checks passed
@alexr00 alexr00 deleted the alexr00/spotless-viper branch January 21, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants