Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6a903d6

Browse filesBrowse files
committed
Fixed a bug in the databinding of the 'private' field.
Luca pointed out this bug in lucamilanesio@ae7a616
1 parent d4b3166 commit 6a903d6
Copy full SHA for 6a903d6

File tree

Expand file treeCollapse file tree

2 files changed

+6
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-4
lines changed

‎src/main/java/org/kohsuke/github/GHRepository.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
*/
2424
package org.kohsuke.github;
2525

26+
import com.fasterxml.jackson.annotation.JsonProperty;
2627
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
2728

29+
import javax.xml.bind.DatatypeConverter;
2830
import java.io.IOException;
2931
import java.io.InterruptedIOException;
3032
import java.net.URL;
@@ -42,7 +44,6 @@
4244
import java.util.Map;
4345
import java.util.Set;
4446
import java.util.TreeMap;
45-
import javax.xml.bind.DatatypeConverter;
4647

4748
import static java.util.Arrays.*;
4849

@@ -59,7 +60,9 @@ public class GHRepository {
5960
private String url; // this is the API url
6061
private String html_url; // this is the UI
6162
private GHUser owner; // not fully populated. beware.
62-
private boolean has_issues, has_wiki, fork, _private, has_downloads;
63+
private boolean has_issues, has_wiki, fork, has_downloads;
64+
@JsonProperty("private")
65+
private boolean _private;
6366
private int watchers,forks,open_issues,size;
6467
private String created_at, pushed_at;
6568
private Map<Integer,GHMilestone> milestones = new HashMap<Integer, GHMilestone>();

‎src/test/java/Foo.java

Copy file name to clipboardExpand all lines: src/test/java/Foo.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
public class Foo {
99
public static void main(String[] args) throws Exception {
10-
System.out.println(GitHub.connect().createToken(
11-
Arrays.asList("user", "repo", "delete_repo", "notifications", "gist"), "GitHub API", null).getToken());
10+
System.out.println(GitHub.connect().getOrganization("cloudbees").getRepository("grandcentral").isPrivate());
1211
}
1312
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.