/** * Forks this repository as your repository. * * @return * Newly forked repository that belong to you. */ public GHRepository fork() throws IOException { new Requester(root).method("POST").to(getApiTailUrl("forks"), null); // this API is asynchronous. we need to wait for a bit for (int i=0; i<10; i++) { GHRepository r = root.getMyself().getRepository(name); if (r!=null) return r; try { Thread.sleep(3000); } catch (InterruptedException e) { throw (IOException)new InterruptedIOException().initCause(e); } } throw new IOException(this+" was forked but can't find the new repository"); }
/** * Forks this repository as your repository. * * @return * Newly forked repository that belong to you. */ public GHRepository fork() throws IOException { new Requester(root).method("POST").to(getApiTailUrl("forks"), null); // this API is asynchronous. we need to wait for a bit for (int i=0; i<10; i++) { GHRepository r = root.getMyself().getRepository(name); if (r!=null) return r; try { Thread.sleep(3000); } catch (InterruptedException e) { throw (IOException)new InterruptedIOException().initCause(e); } } throw new IOException(this+" was forked but can't find the new repository"); }
GHRepository repo = myself.getRepository(sourceName); if (repo != null && repo.getOwnerName().equals(repoOwner)) { if (request.process(repo.getName(), sourceFactory, null, witness)) {