示例#1
0
 /**
  * Gets the branches to clone if {@code cloneAllBranches} is set to {@code false}. If not set, it
  * will default to {@code branch}.
  *
  * @return the branches to clone
  */
 @Input
 public Collection<String> getBranchesToClone() {
   if (branchesToClone == null) {
     return Arrays.asList(getBranch());
   }
   Collection<String> branches = new HashSet<String>();
   for (Object branch : branchesToClone) {
     branches.add(ObjectUtil.unpackString(branch));
   }
   return branches;
 }
示例#2
0
 /**
  * Gets the name used to track the upstream repository. Defaults to "origin" if not set.
  *
  * @return the remote name
  */
 @Input
 public String getRemote() {
   return remote == null ? "origin" : ObjectUtil.unpackString(remote);
 }
示例#3
0
 /**
  * Gets the ref to checkout if {@code checkout} is set to {@code true}. Defaults to
  * "refs/heads/master".
  *
  * @return the ref to checkout
  * @since 0.5.0
  */
 @Input
 public String getRef() {
   return ref == null ? BRANCH_ROOT + "master" : ObjectUtil.unpackString(ref);
 }
示例#4
0
 /**
  * Gets the URI of the repo to clone.
  *
  * @return the uri
  */
 @Input
 public String getUri() {
   return ObjectUtil.unpackString(uri);
 }