when authenticated, repository returns additional information, so always send in a credential when one is available

This commit is contained in:
Kohsuke Kawaguchi
2012-05-21 22:37:48 -07:00
parent 73a20ad829
commit 66656ce612
2 changed files with 1 additions and 10 deletions

View File

@@ -43,15 +43,6 @@ public class GHOrganization extends GHPerson {
return root.retrieveWithAuth("/organizations/"+login+"/teams",JsonTeams.class).toMap(this);
}
@Override
public GHRepository getRepository(String name) throws IOException {
try {
return root.retrieveWithAuth3("/repos/" + login + '/' + name, GHRepository.class).wrap(root);
} catch (FileNotFoundException e) {
return null;
}
}
/**
* Publicizes the membership.
*/

View File

@@ -87,7 +87,7 @@ public abstract class GHPerson {
*/
public GHRepository getRepository(String name) throws IOException {
try {
return root.retrieve3("/repos/" + login + '/' + name, GHRepository.class).wrap(root);
return root.retrieveWithAuth3("/repos/" + login + '/' + name, GHRepository.class).wrap(root);
} catch (FileNotFoundException e) {
return null;
}