renameTo wasn't updating some fields

This commit is contained in:
Kohsuke Kawaguchi
2011-03-16 17:12:22 -07:00
parent f6e7ee3253
commit cffa552ba1
2 changed files with 18 additions and 2 deletions

View File

@@ -43,11 +43,15 @@ public abstract class GHPerson {
*/
protected GHRepository refreshRepository(String name) throws IOException {
if (repositories==null) getRepositories(); // fetch the base first
GHRepository r = root.retrieve("/repos/show/" + login + '/' + name, JsonRepository.class).wrap(root);
GHRepository r = fetchRepository(name);
repositories.put(name,r);
return r;
}
protected GHRepository fetchRepository(String name) throws IOException {
return root.retrieve("/repos/show/" + login + '/' + name, JsonRepository.class).wrap(root);
}
public GHRepository getRepository(String name) throws IOException {
return getRepositories().get(name);
}