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

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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