mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-12 00:11:22 +00:00
Compare commits
22 Commits
github-api
...
github-api
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38b77a9c79 | ||
|
|
7d294ee8c2 | ||
|
|
33d9422d03 | ||
|
|
bb7302c23a | ||
|
|
d50ae63a5a | ||
|
|
1961836e19 | ||
|
|
f2ed7c15ce | ||
|
|
4dce173630 | ||
|
|
86f868b2d4 | ||
|
|
363064f5c0 | ||
|
|
9d99ee9cfc | ||
|
|
db8969707d | ||
|
|
a24ac37dfd | ||
|
|
1b04d471b3 | ||
|
|
9cc400a081 | ||
|
|
e233aeec0c | ||
|
|
5dfd621900 | ||
|
|
f0f6a9988f | ||
|
|
8b38a20c18 | ||
|
|
e7b76bfdc5 | ||
|
|
3503ff6d36 | ||
|
|
192e21a9fc |
10
pom.xml
10
pom.xml
@@ -7,7 +7,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>github-api</artifactId>
|
<artifactId>github-api</artifactId>
|
||||||
<version>1.92</version>
|
<version>1.93</version>
|
||||||
<name>GitHub API for Java</name>
|
<name>GitHub API for Java</name>
|
||||||
<url>http://github-api.kohsuke.org/</url>
|
<url>http://github-api.kohsuke.org/</url>
|
||||||
<description>GitHub API for Java</description>
|
<description>GitHub API for Java</description>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<connection>scm:git:git@github.com/kohsuke/${project.artifactId}.git</connection>
|
<connection>scm:git:git@github.com/kohsuke/${project.artifactId}.git</connection>
|
||||||
<developerConnection>scm:git:ssh://git@github.com/kohsuke/${project.artifactId}.git</developerConnection>
|
<developerConnection>scm:git:ssh://git@github.com/kohsuke/${project.artifactId}.git</developerConnection>
|
||||||
<url>http://${project.artifactId}.kohsuke.org/</url>
|
<url>http://${project.artifactId}.kohsuke.org/</url>
|
||||||
<tag>github-api-1.92</tag>
|
<tag>github-api-1.93</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
@@ -96,9 +96,9 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-lang</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
<version>2.6</version>
|
<version>3.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package org.kohsuke.github;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* How is an user associated with a repository?
|
||||||
|
*
|
||||||
|
* @author Kohsuke Kawaguchi
|
||||||
|
*/
|
||||||
|
public enum GHCommentAuthorAssociation {
|
||||||
|
/**
|
||||||
|
* Author has been invited to collaborate on the repository.
|
||||||
|
*/
|
||||||
|
COLLABORATOR,
|
||||||
|
/**
|
||||||
|
* Author has previously committed to the repository.
|
||||||
|
*/
|
||||||
|
CONTRIBUTOR,
|
||||||
|
/**
|
||||||
|
* Author has not previously committed to GitHub.
|
||||||
|
*/
|
||||||
|
FIRST_TIMER,
|
||||||
|
/**
|
||||||
|
* Author has not previously committed to the repository.
|
||||||
|
*/
|
||||||
|
FIRST_TIME_CONTRIBUTOR,
|
||||||
|
/**
|
||||||
|
* Author is a member of the organization that owns the repository.
|
||||||
|
*/
|
||||||
|
MEMBER,
|
||||||
|
/**
|
||||||
|
* Author has no association with the repository.
|
||||||
|
*/
|
||||||
|
NONE,
|
||||||
|
/**
|
||||||
|
* Author is the owner of the repository.
|
||||||
|
*/
|
||||||
|
OWNER
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.kohsuke.github;
|
package org.kohsuke.github;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.kohsuke.github;
|
package org.kohsuke.github;
|
||||||
|
|
||||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -49,6 +48,8 @@ import static org.kohsuke.github.Previews.*;
|
|||||||
* @see GHIssueSearchBuilder
|
* @see GHIssueSearchBuilder
|
||||||
*/
|
*/
|
||||||
public class GHIssue extends GHObject implements Reactable{
|
public class GHIssue extends GHObject implements Reactable{
|
||||||
|
private static final String ASSIGNEES = "assignees";
|
||||||
|
|
||||||
GitHub root;
|
GitHub root;
|
||||||
GHRepository owner;
|
GHRepository owner;
|
||||||
|
|
||||||
@@ -268,8 +269,7 @@ public class GHIssue extends GHObject implements Reactable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addAssignees(Collection<GHUser> assignees) throws IOException {
|
public void addAssignees(Collection<GHUser> assignees) throws IOException {
|
||||||
List<String> names = toLogins(assignees);
|
root.retrieve().method("POST").withLogins(ASSIGNEES,assignees).to(getIssuesApiRoute()+"/assignees",this);
|
||||||
root.retrieve().method("POST").with("assignees",names).to(getIssuesApiRoute()+"/assignees",this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAssignees(GHUser... assignees) throws IOException {
|
public void setAssignees(GHUser... assignees) throws IOException {
|
||||||
@@ -277,7 +277,7 @@ public class GHIssue extends GHObject implements Reactable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setAssignees(Collection<GHUser> assignees) throws IOException {
|
public void setAssignees(Collection<GHUser> assignees) throws IOException {
|
||||||
editIssue("assignees",toLogins(assignees));
|
new Requester(root).withLogins(ASSIGNEES, assignees).method("PATCH").to(getIssuesApiRoute());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAssignees(GHUser... assignees) throws IOException {
|
public void removeAssignees(GHUser... assignees) throws IOException {
|
||||||
@@ -285,16 +285,7 @@ public class GHIssue extends GHObject implements Reactable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void removeAssignees(Collection<GHUser> assignees) throws IOException {
|
public void removeAssignees(Collection<GHUser> assignees) throws IOException {
|
||||||
List<String> names = toLogins(assignees);
|
root.retrieve().method("DELETE").withLogins(ASSIGNEES,assignees).inBody().to(getIssuesApiRoute()+"/assignees",this);
|
||||||
root.retrieve().method("DELETE").with("assignees",names).inBody().to(getIssuesApiRoute()+"/assignees",this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<String> toLogins(Collection<GHUser> assignees) {
|
|
||||||
List<String> names = new ArrayList<String>(assignees.size());
|
|
||||||
for (GHUser a : assignees) {
|
|
||||||
names.add(a.getLogin());
|
|
||||||
}
|
|
||||||
return names;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getApiRoute() {
|
protected String getApiRoute() {
|
||||||
|
|||||||
@@ -32,11 +32,13 @@ import static org.kohsuke.github.Previews.*;
|
|||||||
* Comment to the issue
|
* Comment to the issue
|
||||||
*
|
*
|
||||||
* @author Kohsuke Kawaguchi
|
* @author Kohsuke Kawaguchi
|
||||||
|
* @see GHIssue#comment(String)
|
||||||
|
* @see GHIssue#listComments()
|
||||||
*/
|
*/
|
||||||
public class GHIssueComment extends GHObject implements Reactable {
|
public class GHIssueComment extends GHObject implements Reactable {
|
||||||
GHIssue owner;
|
GHIssue owner;
|
||||||
|
|
||||||
private String body, gravatar_id;
|
private String body, gravatar_id, html_url, author_association;
|
||||||
private GHUser user; // not fully populated. beware.
|
private GHUser user; // not fully populated. beware.
|
||||||
|
|
||||||
/*package*/ GHIssueComment wrapUp(GHIssue owner) {
|
/*package*/ GHIssueComment wrapUp(GHIssue owner) {
|
||||||
@@ -73,12 +75,13 @@ public class GHIssueComment extends GHObject implements Reactable {
|
|||||||
return owner == null || owner.root.isOffline() ? user : owner.root.getUser(user.getLogin());
|
return owner == null || owner.root.isOffline() ? user : owner.root.getUser(user.getLogin());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated This object has no HTML URL.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public URL getHtmlUrl() {
|
public URL getHtmlUrl() {
|
||||||
return null;
|
return GitHub.parseURL(html_url);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GHCommentAuthorAssociation getAuthorAssociation() {
|
||||||
|
return GHCommentAuthorAssociation.valueOf(author_association);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.kohsuke.github;
|
package org.kohsuke.github;
|
||||||
|
|
||||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SSH public key.
|
* SSH public key.
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package org.kohsuke.github;
|
|||||||
|
|
||||||
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
|
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
|
||||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||||
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
|
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||||
import org.apache.commons.lang.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import javax.annotation.CheckForNull;
|
import javax.annotation.CheckForNull;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import java.util.List;
|
|||||||
public class GHPullRequest extends GHIssue {
|
public class GHPullRequest extends GHIssue {
|
||||||
|
|
||||||
private static final String COMMENTS_ACTION = "/comments";
|
private static final String COMMENTS_ACTION = "/comments";
|
||||||
|
private static final String REQUEST_REVIEWERS = "/requested_reviewers";
|
||||||
|
|
||||||
private String patch_url, diff_url, issue_url;
|
private String patch_url, diff_url, issue_url;
|
||||||
private GHCommitPointer base;
|
private GHCommitPointer base;
|
||||||
@@ -345,6 +346,12 @@ public class GHPullRequest extends GHIssue {
|
|||||||
.to(getApiRoute() + COMMENTS_ACTION, GHPullRequestReviewComment.class).wrapUp(this);
|
.to(getApiRoute() + COMMENTS_ACTION, GHPullRequestReviewComment.class).wrapUp(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void requestReviewers(List<GHUser> reviewers) throws IOException {
|
||||||
|
new Requester(root).method("POST")
|
||||||
|
.withLogins("reviewers", reviewers)
|
||||||
|
.to(getApiRoute() + REQUEST_REVIEWERS);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge this pull request.
|
* Merge this pull request.
|
||||||
*
|
*
|
||||||
@@ -393,7 +400,7 @@ public class GHPullRequest extends GHIssue {
|
|||||||
|
|
||||||
private void fetchIssue() throws IOException {
|
private void fetchIssue() throws IOException {
|
||||||
if (!fetchedIssueDetails) {
|
if (!fetchedIssueDetails) {
|
||||||
new Requester(root).to(getIssuesApiRoute(), this);
|
new Requester(root).method("GET").to(getIssuesApiRoute(), this);
|
||||||
fetchedIssueDetails = true;
|
fetchedIssueDetails = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class GHPullRequestFileDetail {
|
|||||||
String raw_url;
|
String raw_url;
|
||||||
String contents_url;
|
String contents_url;
|
||||||
String patch;
|
String patch;
|
||||||
|
String previous_filename;
|
||||||
|
|
||||||
public String getSha() {
|
public String getSha() {
|
||||||
return sha;
|
return sha;
|
||||||
@@ -83,4 +84,9 @@ public class GHPullRequestFileDetail {
|
|||||||
public String getPatch() {
|
public String getPatch() {
|
||||||
return patch;
|
return patch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPreviousFilename()
|
||||||
|
{
|
||||||
|
return previous_filename;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
|
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
|
||||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.kohsuke.github;
|
package org.kohsuke.github;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
package org.kohsuke.github;
|
package org.kohsuke.github;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
|
import com.fasterxml.jackson.databind.MapperFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.introspect.VisibilityChecker.Std;
|
import com.fasterxml.jackson.databind.introspect.VisibilityChecker.Std;
|
||||||
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
|
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
|
||||||
@@ -909,6 +910,7 @@ public class GitHub {
|
|||||||
static {
|
static {
|
||||||
MAPPER.setVisibilityChecker(new Std(NONE, NONE, NONE, NONE, ANY));
|
MAPPER.setVisibilityChecker(new Std(NONE, NONE, NONE, NONE, ANY));
|
||||||
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
MAPPER.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* package */ static final String GITHUB_URL = "https://api.github.com";
|
/* package */ static final String GITHUB_URL = "https://api.github.com";
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package org.kohsuke.github;
|
|||||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import javax.annotation.CheckForNull;
|
import javax.annotation.CheckForNull;
|
||||||
import javax.annotation.WillClose;
|
import javax.annotation.WillClose;
|
||||||
@@ -63,7 +63,7 @@ import static java.util.Arrays.asList;
|
|||||||
import static java.util.logging.Level.FINE;
|
import static java.util.logging.Level.FINE;
|
||||||
import static java.util.logging.Level.FINEST;
|
import static java.util.logging.Level.FINEST;
|
||||||
import static java.util.logging.Level.INFO;
|
import static java.util.logging.Level.INFO;
|
||||||
import static org.apache.commons.lang.StringUtils.defaultString;
|
import static org.apache.commons.lang3.StringUtils.defaultString;
|
||||||
import static org.kohsuke.github.GitHub.MAPPER;
|
import static org.kohsuke.github.GitHub.MAPPER;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -169,6 +169,14 @@ class Requester {
|
|||||||
return _with(key, value);
|
return _with(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Requester withLogins(String key, Collection<GHUser> users) {
|
||||||
|
List<String> names = new ArrayList<String>(users.size());
|
||||||
|
for (GHUser a : users) {
|
||||||
|
names.add(a.getLogin());
|
||||||
|
}
|
||||||
|
return with(key,names);
|
||||||
|
}
|
||||||
|
|
||||||
public Requester with(String key, Map<String, String> value) {
|
public Requester with(String key, Map<String, String> value) {
|
||||||
return _with(key, value);
|
return _with(key, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,25 @@
|
|||||||
package org.kohsuke.github.extras;
|
package org.kohsuke.github.extras;
|
||||||
|
|
||||||
|
import com.squareup.okhttp.ConnectionSpec;
|
||||||
import com.squareup.okhttp.OkHttpClient;
|
import com.squareup.okhttp.OkHttpClient;
|
||||||
import com.squareup.okhttp.OkUrlFactory;
|
import com.squareup.okhttp.OkUrlFactory;
|
||||||
|
|
||||||
import org.kohsuke.github.HttpConnector;
|
import org.kohsuke.github.HttpConnector;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
import javax.net.ssl.SSLSocketFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link HttpConnector} for {@link OkHttpClient}.
|
* {@link HttpConnector} for {@link OkHttpClient}.
|
||||||
*
|
*
|
||||||
@@ -23,10 +35,33 @@ public class OkHttpConnector implements HttpConnector {
|
|||||||
private final OkUrlFactory urlFactory;
|
private final OkUrlFactory urlFactory;
|
||||||
|
|
||||||
public OkHttpConnector(OkUrlFactory urlFactory) {
|
public OkHttpConnector(OkUrlFactory urlFactory) {
|
||||||
|
urlFactory.client().setSslSocketFactory(TlsSocketFactory());
|
||||||
|
urlFactory.client().setConnectionSpecs(TlsConnectionSpecs());
|
||||||
this.urlFactory = urlFactory;
|
this.urlFactory = urlFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpURLConnection connect(URL url) throws IOException {
|
public HttpURLConnection connect(URL url) throws IOException {
|
||||||
return urlFactory.open(url);
|
return urlFactory.open(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns TLSv1.2 only SSL Socket Factory. */
|
||||||
|
private SSLSocketFactory TlsSocketFactory() {
|
||||||
|
SSLContext sc;
|
||||||
|
try {
|
||||||
|
sc = SSLContext.getInstance("TLSv1.2");
|
||||||
|
} catch (NoSuchAlgorithmException e) {
|
||||||
|
throw new RuntimeException(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
sc.init(null, null, null);
|
||||||
|
return sc.getSocketFactory();
|
||||||
|
} catch (KeyManagementException e) {
|
||||||
|
throw new RuntimeException(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns connection spec with TLS v1.2 in it */
|
||||||
|
private List<ConnectionSpec> TlsConnectionSpecs() {
|
||||||
|
return Arrays.asList(ConnectionSpec.MODERN_TLS, ConnectionSpec.CLEARTEXT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ public class AppTest extends AbstractGitHubApiTestBase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMembership() throws Exception {
|
public void testMembership() throws Exception {
|
||||||
Set<String> members = gitHub.getOrganization("jenkinsci").getRepository("violations-plugin").getCollaboratorNames();
|
Set<String> members = gitHub.getOrganization("github-api-test-org").getRepository("jenkins").getCollaboratorNames();
|
||||||
System.out.println(members.contains("kohsuke"));
|
System.out.println(members.contains("kohsuke"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user