Skip to content

Commit 9cc400a

Browse files
committed
Fixes hub4j#421 - Enum case doesn't match for Pull Request Reviews
* Set Jackson to ignore case differences in enums.
1 parent 24e288d commit 9cc400a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/kohsuke/github/GitHub.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
package org.kohsuke.github;
2525

2626
import com.fasterxml.jackson.databind.DeserializationFeature;
27+
import com.fasterxml.jackson.databind.MapperFeature;
2728
import com.fasterxml.jackson.databind.ObjectMapper;
2829
import com.fasterxml.jackson.databind.introspect.VisibilityChecker.Std;
2930
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
@@ -909,6 +910,7 @@ public Reader renderMarkdown(String text) throws IOException {
909910
static {
910911
MAPPER.setVisibilityChecker(new Std(NONE, NONE, NONE, NONE, ANY));
911912
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
913+
MAPPER.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS, true);
912914
}
913915

914916
/* package */ static final String GITHUB_URL = "https://api.github.com";

0 commit comments

Comments
 (0)