commit | d3024ddce1617453e84ca3e214e309c87ee13f86 | [log] [tgz] |
---|---|---|
author | Marcin Czech <maczech@gmail.com> | Tue Jan 04 08:39:19 2022 +0100 |
committer | Marcin Czech <maczech@gmail.com> | Tue Jan 04 08:39:19 2022 +0100 |
tree | 3a5317881d71956618c8a50f5a414dd81035e7a7 | |
parent | 21e20a1186896626d409bc513260768e79f95e19 [diff] | |
parent | ffe600937205d7b8c256c7b451d659927d158996 [diff] |
Merge branch 'stable-3.3' into stable-3.4 * stable-3.3: Fix issue with importing PR without description Change-Id: Ice12368d642e4c42a9e4d42457ff1285d3b22eb1
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java index f536c70..e47f161 100644 --- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java +++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
@@ -102,8 +102,8 @@ for (GHPullRequest pr : repoEntry.getValue()) { JsonObject prObj = new JsonObject(); prObj.add("id", new JsonPrimitive(new Integer(pr.getNumber()))); - prObj.add("title", new JsonPrimitive(pr.getTitle())); - prObj.add("body", new JsonPrimitive(pr.getBody())); + prObj.add("title", new JsonPrimitive(Strings.nullToEmpty(pr.getTitle()))); + prObj.add("body", new JsonPrimitive(Strings.nullToEmpty(pr.getBody()))); prObj.add( "author", new JsonPrimitive(pr.getUser() == null ? "" : pr.getUser().getLogin())); prObj.add("status", new JsonPrimitive(pr.getState().name()));