code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
public Date getModifiedDate() { return materialRevisions.getDateOfLatestModification(); }
Understands why a pipeline was triggered and what revisions it contains
getModifiedDate
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public Materials materials() { final List<Material> materials = new ArrayList<>(); materialRevisions.accept(new ModificationVisitorAdapter() { @Override public void visit(Material material, Revision revision) { materials.add(material); } }); ...
Understands why a pipeline was triggered and what revisions it contains
materials
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
@Override public void visit(Material material, Revision revision) { materials.add(material); }
Understands why a pipeline was triggered and what revisions it contains
visit
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
@Override public String toString() { return String.format("[%s: %s]", trigger.getDbName(), getBuildCauseMessage()); }
Understands why a pipeline was triggered and what revisions it contains
toString
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public boolean materialsMatch(MaterialConfigs other) { try { assertMaterialsMatch(other); } catch (BuildCauseOutOfDateException e) { return false; } return true; }
Understands why a pipeline was triggered and what revisions it contains
materialsMatch
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public boolean hasDependencyMaterials() { return this.getMaterialRevisions().hasDependencyMaterials(); }
Understands why a pipeline was triggered and what revisions it contains
hasDependencyMaterials
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public List<DependencyMaterial> getDependencyMaterials() { return this.getMaterialRevisions().getDependencyMaterials(); }
Understands why a pipeline was triggered and what revisions it contains
getDependencyMaterials
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public boolean pipelineConfigAndMaterialRevisionMatch(PipelineConfig pipelineConfig) { if (!pipelineConfig.isConfigOriginSameAsOneOfMaterials()) { return true; } RepoConfigOrigin repoConfigOrigin = (RepoConfigOrigin) pipelineConfig.getOrigin(); MaterialConfig configAndCodeM...
Understands why a pipeline was triggered and what revisions it contains
pipelineConfigAndMaterialRevisionMatch
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public void assertMaterialsMatch(MaterialConfigs other) { Materials materialsFromBuildCause = materials(); for (MaterialConfig materialConfig : other) { if (!materialsFromBuildCause.hasMaterialConfigWithFingerprint(materialConfig)) { invalid(other); } } ...
Understands why a pipeline was triggered and what revisions it contains
assertMaterialsMatch
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public void assertPipelineConfigAndMaterialRevisionMatch(PipelineConfig pipelineConfig) { if (!pipelineConfig.isConfigOriginSameAsOneOfMaterials()) { return; } // then config and code revision must both match if (this.trigger.isForced() || this.hasDependencyMaterials()) { ...
Understands why a pipeline was triggered and what revisions it contains
assertPipelineConfigAndMaterialRevisionMatch
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
private void invalidRevision(String configRevision, String codeRevision) { throw new BuildCauseOutOfDateException( "Illegal build cause - pipeline configuration is from different revision than scm material. " + "Pipeline configuration revision: " + configRevision + " " ...
Understands why a pipeline was triggered and what revisions it contains
invalidRevision
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
private void invalid(MaterialConfigs materialsFromConfig) { throw new BuildCauseOutOfDateException( "Illegal build cause - it has different materials from the pipeline it is trying to trigger. " + "Materials for which modifications are available: " + materials() + " " ...
Understands why a pipeline was triggered and what revisions it contains
invalid
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BuildCause that = (BuildCause) o; if (materialRevisions != null ? !materialRevisions.equals(that.materi...
Understands why a pipeline was triggered and what revisions it contains
equals
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
@Override public int hashCode() { int result = materialRevisions != null ? materialRevisions.hashCode() : 0; result = 31 * result + (trigger != null ? trigger.hashCode() : 0); return result; }
Understands why a pipeline was triggered and what revisions it contains
hashCode
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public boolean isSameAs(BuildCause buildCause) { if (!Objects.equals(this.trigger.getDbName(), buildCause.trigger.getDbName())) { return false; } return materialRevisions.isSameAs(buildCause.materialRevisions); }
Understands why a pipeline was triggered and what revisions it contains
isSameAs
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public boolean hasNeverRun() { return this.equals(createNeverRun()); }
Understands why a pipeline was triggered and what revisions it contains
hasNeverRun
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public static BuildCause createManualForced(MaterialRevisions materialRevisions, Username username) { if (username == null) { throw new IllegalArgumentException("Username cannot be null"); } String message = String.format("Forced by %s", username.getDisplayName()); return n...
Understands why a pipeline was triggered and what revisions it contains
createManualForced
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public static BuildCause createManualForced() { return createManualForced(MaterialRevisions.EMPTY, Username.ANONYMOUS); }
Understands why a pipeline was triggered and what revisions it contains
createManualForced
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public static BuildCause fromDbString(String text) { return switch (text) { case BuildTrigger.FORCED_BUILD_CAUSE -> BuildCause.createManualForced(MaterialRevisions.EMPTY, Username.ANONYMOUS); case BuildTrigger.MODIFICATION_BUILD_CAUSE -> createWithEmptyModifications()...
Understands why a pipeline was triggered and what revisions it contains
fromDbString
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public String toDbString() { return trigger.getDbName(); }
Understands why a pipeline was triggered and what revisions it contains
toDbString
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public static BuildCause createWithModifications(MaterialRevisions materialRevisions, String approver) { return new BuildCause(materialRevisions, BuildTrigger.forModifications(materialRevisions), approver); }
Understands why a pipeline was triggered and what revisions it contains
createWithModifications
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public static BuildCause createWithEmptyModifications() { return createWithModifications(MaterialRevisions.EMPTY, ""); }
Understands why a pipeline was triggered and what revisions it contains
createWithEmptyModifications
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public static BuildCause createExternal() { return new BuildCause(MaterialRevisions.EMPTY, BuildTrigger.forExternal(), ""); }
Understands why a pipeline was triggered and what revisions it contains
createExternal
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public static BuildCause createNeverRun() { return NEVER_RUN; }
Understands why a pipeline was triggered and what revisions it contains
createNeverRun
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public String getApprover() { return approver; }
Understands why a pipeline was triggered and what revisions it contains
getApprover
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public void setApprover(String approvedBy) { approver = approvedBy; }
Understands why a pipeline was triggered and what revisions it contains
setApprover
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public EnvironmentVariables getVariables() { return variables; }
Understands why a pipeline was triggered and what revisions it contains
getVariables
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public void setVariables(EnvironmentVariables variables) { this.variables = variables; }
Understands why a pipeline was triggered and what revisions it contains
setVariables
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/buildcause/BuildCause.java
Apache-2.0
public String getShortRevision() { return shortRevision; }
Understands a material revision which matches a search criteria
getShortRevision
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
Apache-2.0
public String getLongRevision() { return longRevision; }
Understands a material revision which matches a search criteria
getLongRevision
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
Apache-2.0
public String getUser() { return user; }
Understands a material revision which matches a search criteria
getUser
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
Apache-2.0
public Date getCheckinTime() { return checkinTime; }
Understands a material revision which matches a search criteria
getCheckinTime
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
Apache-2.0
public String getComment() { return comment; }
Understands a material revision which matches a search criteria
getComment
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MatchedRevision that = (MatchedRevision) o; if (searchString != null ? !searchString.equals(that.searchString) : that.searchString != null) return fals...
Understands a material revision which matches a search criteria
equals
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
Apache-2.0
@Override public int hashCode() { int result = searchString != null ? searchString.hashCode() : 0; result = 31 * result + (shortRevision != null ? shortRevision.hashCode() : 0); result = 31 * result + (longRevision != null ? longRevision.hashCode() : 0); result = 31 * result + (user ...
Understands a material revision which matches a search criteria
hashCode
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
Apache-2.0
@Override public String toString() { return ToStringBuilder.reflectionToString(this); }
Understands a material revision which matches a search criteria
toString
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/MatchedRevision.java
Apache-2.0
public final ModifiedFile createModifiedFile(String filename, String folder, ModifiedAction modifiedAction) { ModifiedFile file = new ModifiedFile(filename, folder, modifiedAction); files.add(file); return file; }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
createModifiedFile
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public Map<String, String> getAdditionalDataMap() { return additionalDataMap == null ? new HashMap<>() : additionalDataMap; }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
getAdditionalDataMap
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void setAdditionalData(String additionalData) { this.additionalData = additionalData; this.additionalDataMap = JsonHelper.safeFromJson(this.additionalData, new TypeToken<HashMap<String, String>>() {}.getType()); }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
setAdditionalData
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void setUserName(String name) { this.userName = name; }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
setUserName
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void setEmailAddress(String email) { this.emailAddress = email; }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
setEmailAddress
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void setComment(String comment) { this.comment = comment; }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
setComment
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void setRevision(String revision) { this.revision = revision; }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
setRevision
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void setModifiedTime(Date modifiedTime) { this.modifiedTime = modifiedTime; }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
setModifiedTime
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void setModifiedFiles(List<ModifiedFile> files) { this.files = files == null ? new LinkedHashSet<>() : new LinkedHashSet<>(files); }
data structure for holding data about a single modification to a source control tool. <p/> <modification type="" date="" user="" email=""> <comment></comment> <file > </modification>
setModifiedFiles
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public List<ModifiedFile> getModifiedFiles() { return List.copyOf(files); }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getModifiedFiles
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
@Override public int compareTo(Modification o) { return modifiedTime.compareTo(o.modifiedTime); }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
compareTo
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public Date getModifiedTime() { return modifiedTime; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getModifiedTime
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public String getUserName() { return userName; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getUserName
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public String getUserDisplayName() { return StringUtils.isBlank(userName) ? ANONYMOUS : userName; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getUserDisplayName
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public String getRevision() { return revision; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getRevision
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public Long getPipelineId() { return pipelineId; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getPipelineId
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public String getComment() { return comment; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getComment
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
@Override public String toString() { SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); StringBuilder sb = new StringBuilder(); if (materialInstance != null) { sb.append("Material: ").append(materialInstance).append('\n'); } Stri...
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
toString
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public static Revision latestRevision(List<Modification> modifications) { if (modifications.isEmpty()) { throw new RuntimeException("Cannot find latest revision."); } else { return new StringRevision(modifications.get(0).getRevision()); } }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
latestRevision
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void accept(ModificationVisitor visitor) { visitor.visit(this); for (ModifiedFile file : files) { visitor.visit(file); } }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
accept
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Modification that)) { return false; } // Doesn't include additionalDataMap or materialInstance return Objects.equals(userName, that.userName) && ...
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
equals
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
@Override public int hashCode() { // Doesn't include additionalDataMap or materialInstance int result = userName != null ? userName.hashCode() : 0; result = 31 * result + (comment != null ? comment.hashCode() : 0); result = 31 * result + (emailAddress != null ? emailAddress.hashCode(...
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
hashCode
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public void setMaterialInstance(MaterialInstance materialInstance) { this.materialInstance = materialInstance; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
setMaterialInstance
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public MaterialInstance getMaterialInstance() { return materialInstance; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getMaterialInstance
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public static List<Modification> modifications(Modification modification) { List<Modification> modifications = new ArrayList<>(); modifications.add(modification); return modifications; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
modifications
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public boolean isSameRevision(Modification that) { return Objects.equals(revision, that.revision); }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
isSameRevision
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public String getPipelineLabel() { return pipelineLabel; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getPipelineLabel
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
@TestOnly public void setPipelineLabel(String pipelineLabel) { this.pipelineLabel = pipelineLabel; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
setPipelineLabel
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public String id(Matcher matcher) { return matcher.groupCount() > 0 ? contentsOfFirstGroupThatMatched(matcher) : matcher.group(); }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
id
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
private String contentsOfFirstGroupThatMatched(Matcher matcher) { for (int i = 1; i <= matcher.groupCount(); i++) { String groupContent = matcher.group(i); if (groupContent != null) { return groupContent; } } return null; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
contentsOfFirstGroupThatMatched
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public String getEmailAddress() { return emailAddress; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getEmailAddress
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public static Revision oldestRevision(Modifications modifications) { if (modifications.isEmpty()) { throw new RuntimeException("Cannot find oldest revision."); } else { return new StringRevision(modifications.get(modifications.size() - 1).getRevision()); } }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
oldestRevision
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
public String getAdditionalData() { return additionalData; }
Returns the list of modified files for this modification set. @return list of {@link ModifiedFile} objects. If there are no files, this returns an empty list (<code>null</code> is never returned).
getAdditionalData
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/Modification.java
Apache-2.0
private CommandLine git_C() { return git().withArgs("-C", workingDir.getAbsolutePath()); }
Creates git command that includes {@code -C workingDir}. This differs from {@link #gitWd()} in that it does not assert/validate the directory's existence on construction. @return a {@code git} {@link CommandLine} that will switch to {@code workingDir}
git_C
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private CommandLine gitWd() { return git().withWorkingDir(workingDir); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
gitWd
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void updateSubmodule() { CommandLine updateCmd = gitWd().withArgs(gitSubmoduleConfigArgs()).withArgs("submodule", "update"); runOrBomb(updateCmd); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
updateSubmodule
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void tryToShallowUpdateSubmodules() { if (updateSubmoduleWithDepth(1)) { return; } LOG.warn("git submodule update with --depth=1 failed. Attempting again with --depth={}", UNSHALLOW_TRYOUT_STEP); if (updateSubmoduleWithDepth(UNSHALLOW_TRYOUT_STEP)) { retur...
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
tryToShallowUpdateSubmodules
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private boolean updateSubmoduleWithDepth(int depth) { try { runOrBomb(gitWd().withArgs(gitSubmoduleConfigArgs()).withArgs("submodule", "update", "--depth=" + depth)); } catch (Exception e) { LOG.warn(e.getMessage(), e); return false; } return true; ...
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
updateSubmoduleWithDepth
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void cleanAllUnversionedFiles(ConsoleOutputStreamConsumer outputStreamConsumer) { log(outputStreamConsumer, "Cleaning all unversioned files in working copy"); cleanUnversionedFilesInAllSubmodules(); cleanUnversionedFiles(); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
cleanAllUnversionedFiles
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void cleanUnversionedFiles() { runOrBomb(gitWd().withArgs("clean", gitCleanArgs())); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
cleanUnversionedFiles
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void cleanUnversionedFilesInAllSubmodules() { List<String> args = submoduleForEachRecursive(List.of("git", "clean", gitCleanArgs())); runOrBomb(gitWd().withArgs(args)); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
cleanUnversionedFilesInAllSubmodules
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void removeSubmoduleSectionsFromGitConfig(ConsoleOutputStreamConsumer outputStreamConsumer) { log(outputStreamConsumer, "Cleaning submodule configurations in .git/config"); for (String submoduleFolder : submoduleUrls().keySet()) { configRemoveSection("submodule." + submoduleFolder); ...
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
removeSubmoduleSectionsFromGitConfig
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void configRemoveSection(String section) { String[] args = new String[]{"config", "--remove-section", section}; CommandLine gitCmd = gitWd().withArgs(args); runOrBomb(gitCmd, false); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
configRemoveSection
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private boolean gitSubmoduleEnabled() { return new File(workingDir, ".gitmodules").exists(); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
gitSubmoduleEnabled
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void gc(ConsoleOutputStreamConsumer outputStreamConsumer) { log(outputStreamConsumer, "Performing git gc"); CommandLine gitGc = gitWd().withArgs("gc", "--auto"); run(gitGc, outputStreamConsumer); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
gc
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
@TestOnly private List<String> submoduleFolders(List<String> submoduleLines) { List<String> submoduleFolders = new ArrayList<>(); for (String submoduleLine : submoduleLines) { Matcher m = GIT_SUBMODULE_STATUS_PATTERN.matcher(submoduleLine); if (!m.find()) { bo...
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
submoduleFolders
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private void log(ConsoleOutputStreamConsumer outputStreamConsumer, String message, Object... args) { LOG.debug(format(message, args)); outputStreamConsumer.stdOutput(format("[GIT] " + message, args)); }
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
log
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
private List<String> submoduleForEachRecursive(List<String> args) { List<String> forEachArgs = new ArrayList<>(List.of("submodule", "foreach", "--recursive")); if (version().requiresSubmoduleCommandFix()) { forEachArgs.add(StringUtils.join(args, " ")); } else { forEachArg...
Sets (and verifies existence of) CWD for a git command @return a {@code git} {@link CommandLine} with CWD set to {@code workingDir}.
submoduleForEachRecursive
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Apache-2.0
@TestOnly public String admin(String command) { return execute(p4("admin", command)).outputAsString(); }
returns the output stream as is, without smudging password arguments, this is security problem, and should not be used in production code as is
admin
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/perforce/P4Client.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/perforce/P4Client.java
Apache-2.0
public void useTickets(boolean useTickets) { this.useTickets = useTickets; }
returns the output stream as is, without smudging password arguments, this is security problem, and should not be used in production code as is
useTickets
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/perforce/P4Client.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/perforce/P4Client.java
Apache-2.0
public String user() { return p4user; }
returns the output stream as is, without smudging password arguments, this is security problem, and should not be used in production code as is
user
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/perforce/P4Client.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/perforce/P4Client.java
Apache-2.0
public String password() { return p4passwd; }
returns the output stream as is, without smudging password arguments, this is security problem, and should not be used in production code as is
password
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/perforce/P4Client.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/perforce/P4Client.java
Apache-2.0
public TfsCommand create(SubprocessExecutionContext subprocessExecutionContext, UrlArgument url, String domain, String userName, String password, String fingerprint, String projectPath) { return getTfsSdkCommand(subprocessExecutionContext, url, domain, userName, password, fingerprin...
Understands: Factory to give appropriate TFS Command
create
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/tfs/TfsCommandFactory.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/tfs/TfsCommandFactory.java
Apache-2.0
private TfsCommand getTfsSdkCommand(SubprocessExecutionContext subprocessExecutionContext, UrlArgument url, String domain, String userName, String password, String fingerprint, String projectPath) { LOGGER.debug("[TFS SDK] Creating TFS SDK Client"); return getSDKB...
Understands: Factory to give appropriate TFS Command
getTfsSdkCommand
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/tfs/TfsCommandFactory.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/tfs/TfsCommandFactory.java
Apache-2.0
TfsSDKCommandBuilder getSDKBuilder() { try { return TfsSDKCommandBuilder.getBuilder(); } catch (Exception e) { String message = "[TFS SDK] Could not create TFS SDK Builder"; LOGGER.error(message, e); throw new RuntimeException(message, e); } }
Understands: Factory to give appropriate TFS Command
getSDKBuilder
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/materials/tfs/TfsCommandFactory.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/domain/materials/tfs/TfsCommandFactory.java
Apache-2.0
static Date convertDate(String date) throws ParseException { final int zIndex = date.indexOf('Z'); if (zIndex - 3 < 0) { throw new ParseException(date + " doesn't match the expected subversion date format", date.length()); } String withoutMicroSeconds = da...
Converts the specified SVN date string into a Date. @param date with format "yyyy-MM-dd'T'HH:mm:ss.SSS" + "...Z" @return converted date @throws ParseException if specified date doesn't match the expected format
convertDate
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/util/SvnLogXmlParser.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/util/SvnLogXmlParser.java
Apache-2.0
public static DateFormat getOutDateFormatter() { DateFormat f = new SimpleDateFormat(SvnCommand.SVN_DATE_FORMAT_OUT); f.setTimeZone(UTC); return f; }
Converts the specified SVN date string into a Date. @param date with format "yyyy-MM-dd'T'HH:mm:ss.SSS" + "...Z" @return converted date @throws ParseException if specified date doesn't match the expected format
getOutDateFormatter
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/util/SvnLogXmlParser.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/util/SvnLogXmlParser.java
Apache-2.0
private ModifiedAction convertAction(String action) { return switch (action) { case "A" -> ModifiedAction.added; case "M" -> ModifiedAction.modified; case "D" -> ModifiedAction.deleted; default -> ModifiedAction.unknown; }; }
Converts the specified SVN date string into a Date. @param date with format "yyyy-MM-dd'T'HH:mm:ss.SSS" + "...Z" @return converted date @throws ParseException if specified date doesn't match the expected format
convertAction
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/util/SvnLogXmlParser.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/util/SvnLogXmlParser.java
Apache-2.0
public Map<String, String> parseInfoToGetUUID(String output, String queryURL, SafeSaxBuilder builder) { Map<String, String> uidToUrlMap = new HashMap<>(); try { Document document = builder.build(new StringReader(output)); Element root = document.getRootElement(); List...
Converts the specified SVN date string into a Date. @param date with format "yyyy-MM-dd'T'HH:mm:ss.SSS" + "...Z" @return converted date @throws ParseException if specified date doesn't match the expected format
parseInfoToGetUUID
java
gocd/gocd
domain/src/main/java/com/thoughtworks/go/util/SvnLogXmlParser.java
https://github.com/gocd/gocd/blob/master/domain/src/main/java/com/thoughtworks/go/util/SvnLogXmlParser.java
Apache-2.0
@Test void shouldTruncateHashTo7CharsForAShortRevision() { Material git = new GitMaterial("file:///foo"); assertThat(git.getShortRevision("dc3d7e656831d1b203d8b7a63c4de82e26604e52")).isEqualTo("dc3d7e6"); assertThat(git.getShortRevision("24")).isEqualTo("24"); assertThat(git.getShort...
A git abbreviated hash is 7 chars. See the git documentation.
shouldTruncateHashTo7CharsForAShortRevision
java
gocd/gocd
domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
https://github.com/gocd/gocd/blob/master/domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
Apache-2.0
@Test void shouldGetLongDescriptionForMaterial() { GitMaterial gitMaterial = new GitMaterial("http://url/", "branch", "folder"); assertThat(gitMaterial.getLongDescription()).isEqualTo("URL: http://url/, Branch: branch"); }
A git abbreviated hash is 7 chars. See the git documentation.
shouldGetLongDescriptionForMaterial
java
gocd/gocd
domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
https://github.com/gocd/gocd/blob/master/domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
Apache-2.0
@SuppressWarnings("unchecked") @Test void shouldGetAttributesWithSecureFields() { GitMaterial git = new GitMaterial("http://username:password@gitrepo.com", GitMaterialConfig.DEFAULT_BRANCH); Map<String, Object> attributes = git.getAttributes(true); assertThat(attributes.get("type")).isE...
A git abbreviated hash is 7 chars. See the git documentation.
shouldGetAttributesWithSecureFields
java
gocd/gocd
domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
https://github.com/gocd/gocd/blob/master/domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
Apache-2.0
@SuppressWarnings("unchecked") @Test void shouldGetAttributesWithoutSecureFields() { GitMaterial git = new GitMaterial("http://username:password@gitrepo.com", GitMaterialConfig.DEFAULT_BRANCH); Map<String, Object> attributes = git.getAttributes(false); assertThat(attributes.get("type"))...
A git abbreviated hash is 7 chars. See the git documentation.
shouldGetAttributesWithoutSecureFields
java
gocd/gocd
domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
https://github.com/gocd/gocd/blob/master/domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
Apache-2.0
@Test void shouldBeEqualIfObjectsHaveSameUrlBranchAndSubModuleFolder() { final GitMaterial material_1 = new GitMaterial("http://example.com", "master"); material_1.setUserName("bob"); material_1.setSubmoduleFolder("/var/lib/git"); final GitMaterial material_2 = n...
A git abbreviated hash is 7 chars. See the git documentation.
shouldBeEqualIfObjectsHaveSameUrlBranchAndSubModuleFolder
java
gocd/gocd
domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
https://github.com/gocd/gocd/blob/master/domain/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialTest.java
Apache-2.0