diff --git a/CHANGELOG.md b/CHANGELOG.md index 953f9937..9665e6e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 9.22.0 + +* Add support for the `Ghost` user when the Github user is deleted. + ## 9.21.0 * Update MiscService.getApiStatus() to use the v2 API diff --git a/lib/src/common/model/pulls.dart b/lib/src/common/model/pulls.dart index cdbf6ed8..2cb10a8e 100644 --- a/lib/src/common/model/pulls.dart +++ b/lib/src/common/model/pulls.dart @@ -311,14 +311,14 @@ class PullRequestFile { class PullRequestReview { PullRequestReview( {required this.id, - required this.user, + this.user, this.body, this.state, this.htmlUrl, this.pullRequestUrl}); int id; - User user; + User? user; String? body; String? state; String? htmlUrl; diff --git a/lib/src/common/model/pulls.g.dart b/lib/src/common/model/pulls.g.dart index dfe3a3b3..cf370e22 100644 --- a/lib/src/common/model/pulls.g.dart +++ b/lib/src/common/model/pulls.g.dart @@ -253,7 +253,9 @@ Map _$PullRequestFileToJson(PullRequestFile instance) => PullRequestReview _$PullRequestReviewFromJson(Map json) => PullRequestReview( id: json['id'] as int, - user: User.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : User.fromJson(json['user'] as Map), body: json['body'] as String?, state: json['state'] as String?, htmlUrl: json['html_url'] as String?, diff --git a/pubspec.yaml b/pubspec.yaml index 0251b7c7..af2ff765 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: github -version: 9.21.0 +version: 9.22.0 description: A high-level GitHub API Client Library that uses Github's v3 API homepage: https://github.com/SpinlockLabs/github.dart