-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ng-dev): avoid runtime error when pull request does not have stat…
…us/checks Our PR schema was incorrect and did not account for nullable GraphQL fields, causing errors like: ``` TypeError: Cannot read properties of null (reading 'contexts') at getStatusesForPullRequest (/home/douglasparker/Source/ng-cli/ng-dev/pr/common/fetch-pull-request.ts:130:38) at assertSignedCla (/home/douglasparker/Source/ng-cli/ng-dev/pr/common/validation/validations.ts:129:19) at loadAndValidatePullRequest (/home/douglasparker/Source/ng-cli/ng-dev/pr/merge/pull-request.ts:78:5) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async PullRequestMergeTask.merge (/home/douglasparker/Source/ng-cli/ng-dev/pr/merge/task.ts:111:25) at async performMerge (/home/douglasparker/Source/ng-cli/ng-dev/pr/merge/index.ts:46:22) at async mergePullRequest (/home/douglasparker/Source/ng-cli/ng-dev/pr/merge/index.ts:39:9) at async Object.handler (/home/douglasparker/Source/ng-cli/ng-dev/pr/merge/cli.ts:41:3) ``` This commit corrects the typing/schema and fixes the runtime error.
- Loading branch information
1 parent
660672d
commit 2c7dece
Showing
2 changed files
with
55 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters