private void deleteHiddenBranch(final PullRequest pullRequest) { final Path path = this.buildHiddenPath(pullRequest); ioService.delete(path); if (logger.isDebugEnabled()) { logger.debug("Hidden branch {} deleted", pullRequest.toString()); } }
private void deleteHiddenBranch(final PullRequest pullRequest) { final Path path = this.buildHiddenPath(pullRequest); ioService.delete(path); if (logger.isDebugEnabled()) { logger.debug("Hidden branch {} deleted", pullRequest.toString()); } }
protected void createHiddenBranch(final PullRequest pullRequest) { final Path source = this.buildPath(pullRequest.getSourceRepository(), pullRequest.getSourceBranch()); final Path target = this.buildHiddenPath(pullRequest); ioService.copy(source, target); if (logger.isDebugEnabled()) { logger.debug("Hidden branch {} created.", target.toString()); } }
protected void createHiddenBranch(final PullRequest pullRequest) { final Path source = this.buildPath(pullRequest.getSourceRepository(), pullRequest.getSourceBranch()); final Path target = this.buildHiddenPath(pullRequest); ioService.copy(source, target); if (logger.isDebugEnabled()) { logger.debug("Hidden branch {} created.", target.toString()); } }
private void mergePullRequest(final PullRequest pullRequest) { final Path source = this.buildHiddenPath(pullRequest); final Path target = this.buildPath(pullRequest.getTargetRepository(), pullRequest.getTargetBranch()); ioService.copy(source, target, new MergeCopyOption()); if (logger.isDebugEnabled()) { logger.debug("Merged from <{}> to <{}>", source.toString(), target.toString()); } }
private void mergePullRequest(final PullRequest pullRequest) { final Path source = this.buildHiddenPath(pullRequest); final Path target = this.buildPath(pullRequest.getTargetRepository(), pullRequest.getTargetBranch()); ioService.copy(source, target, new MergeCopyOption()); if (logger.isDebugEnabled()) { logger.debug("Merged from <{}> to <{}>", source.toString(), target.toString()); } }
@Test public void testBuildHiddenPath() { ((PullRequestServiceImpl) service).buildHiddenPath(new PullRequestImpl(1, "source/a", "develop", "target/a", "master", PullRequestStatus.OPEN)); final URI uri = URI.create("git://PR-1-source/a/develop-master@target/a"); verify(ioService).get(eq(uri)); }
@Test public void testBuildHiddenPath() { ((PullRequestServiceImpl) service).buildHiddenPath(new PullRequestImpl(1, "test-realm", "source/a", "develop", "test-realm", "target/a", "master", PullRequestStatus.OPEN)); final URI uri = URI.create("git://PR-1-source/a/develop-master@target/a"); verify(ioService).get(eq(uri)); }
@Test public void testBuildHiddenPath() { ((PullRequestServiceImpl) service).buildHiddenPath(new PullRequestImpl(1, "test-realm", "source/a", "develop", "test-realm", "target/a", "master", PullRequestStatus.OPEN)); final URI uri = URI.create("git://PR-1-source/a/develop-master@target/a"); verify(ioService).get(eq(uri)); }