Skip to content

Commit

Permalink
Add more information to ChangedFileInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Aug 16, 2024
1 parent 0c64eb1 commit 499e31b
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ public static class ChangedFileInfo {
private Map<String, String> renamedFilesHint;
private Set<String> repositoryDirectoriesBefore;
private Set<String> repositoryDirectoriesCurrent;
private long commitTime;
private long authoredTime;
private String commitAuthorName;

public ChangedFileInfo() {

Expand All @@ -490,6 +493,22 @@ public ChangedFileInfo(String parentCommitId, String currentCommitId,
this.currentCommitId = currentCommitId;
}

public ChangedFileInfo(String parentCommitId, String currentCommitId,
List<String> filesBefore, List<String> filesCurrent,
Set<String> repositoryDirectoriesBefore, Set<String> repositoryDirectoriesCurrent, Map<String, String> renamedFilesHint,
long commitTime, long authoredTime, String commitAuthorName) {
this.filesBefore = filesBefore;
this.filesCurrent = filesCurrent;
this.renamedFilesHint = renamedFilesHint;
this.repositoryDirectoriesBefore = repositoryDirectoriesBefore;
this.repositoryDirectoriesCurrent = repositoryDirectoriesCurrent;
this.parentCommitId = parentCommitId;
this.currentCommitId = currentCommitId;
this.commitTime = commitTime;
this.authoredTime = authoredTime;
this.commitAuthorName = commitAuthorName;
}

public String getParentCommitId() {
return parentCommitId;
}
Expand Down Expand Up @@ -517,6 +536,18 @@ public Set<String> getRepositoryDirectoriesCurrent() {
public Map<String, String> getRenamedFilesHint() {
return renamedFilesHint;
}

public long getCommitTime() {
return commitTime;
}

public long getAuthoredTime() {
return authoredTime;
}

public String getCommitAuthorName() {
return commitAuthorName;
}
}

private ChangedFileInfo populateWithGitHubAPI(File projectFolder, String cloneURL, String currentCommitId) throws IOException {
Expand Down

0 comments on commit 499e31b

Please sign in to comment.