congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PullRequest.getTargetSpace
Code IndexAdd Tabnine to your IDE (free)

How to use
getTargetSpace
method
in
org.guvnor.structure.repositories.PullRequest

Best Java code snippets using org.guvnor.structure.repositories.PullRequest.getTargetSpace (Showing top 3 results out of 315)

origin: kiegroup/appformer

@Override
public PullRequest getPullRequest(long id) {
  final List<PullRequest> prs = this.getPullRequests(elem -> elem.getId() == id);
  if (prs.size() == 0) {
    throw new NoSuchElementException("The Pull Request with ID #" + id + " not found");
  }
  final PullRequest pr = prs.get(0);
  return new PullRequestImpl(pr.getId(),
                pr.getSourceSpace(),
                pr.getSourceRepository(),
                pr.getSourceBranch(),
                pr.getTargetSpace(),
                pr.getTargetRepository(),
                pr.getTargetBranch(),
                pr.getStatus());
}
origin: kiegroup/appformer

@Override
public List<FileDiff> diff(final PullRequest pullRequest) {
  final Repository repository = repositoryService.getRepositoryFromSpace(spaces.getSpace(pullRequest.getTargetSpace()), pullRequest.getTargetRepository());
  this.createHiddenBranch(pullRequest);
  String diff = String.format("diff:%s,%s",
                pullRequest.getTargetBranch(),
                this.buildHiddenBranchName(pullRequest));
  final List<FileDiff> diffs = (List<FileDiff>) this.ioService.readAttributes(convert(repository.getBranch(pullRequest.getSourceBranch()).get().getPath()),
                                        diff);
  this.deleteHiddenBranch(pullRequest);
  return diffs;
}
origin: kiegroup/appformer

protected void changePullRequestStatus(final String repository,
                    final long id,
                    final PullRequestStatus status) {
  checkNotEmpty("repository",
         repository);
  checkNotNull("status",
         status);
  GitMetadata metadata = getRepositoryMetadata(repository);
  PullRequest pullRequest = metadata.getPullRequest(id);
  PullRequestImpl finalPullRequest = new PullRequestImpl(pullRequest.getId(),
                              pullRequest.getSourceSpace(),
                              pullRequest.getSourceRepository(),
                              pullRequest.getSourceBranch(),
                              pullRequest.getTargetSpace(),
                              pullRequest.getTargetRepository(),
                              pullRequest.getTargetBranch(),
                              status);
  List<PullRequest> finalPullRequests = metadata.getPullRequests(elem -> elem.getId() != id);
  finalPullRequests.add(finalPullRequest);
  GitMetadata storableMetadata = new GitMetadataImpl(metadata.getName(),
                            metadata.getOrigin(),
                            metadata.getForks(),
                            finalPullRequests);
  this.metadataStore.write(storableMetadata.getName(),
               storableMetadata);
}
org.guvnor.structure.repositoriesPullRequestgetTargetSpace

Popular methods of PullRequest

  • getId
  • getStatus
  • getTargetBranch
  • getTargetRepository
  • getSourceBranch
  • getSourceRepository
  • getSourceSpace

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now