Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sangupta/1355351 to your computer and use it in GitHub Desktop.
Save sangupta/1355351 to your computer and use it in GitHub Desktop.
Class to hold the statistics as returned by the GitHub Commit API for single commit details.
/**
Add the following lines to the original class:
org.eclipse.egit.github.core.RepositoryCommit.java
*/
private Stats stats;
private List<CommitFile> files;
public Stats getStats() {
return stats;
}
public void setStats(Stats stats) {
this.stats = stats;
}
public List<CommitFile> getFiles() {
return files;
}
public void setFiles(List<CommitFile> files) {
this.files = files;
}
package org.eclipse.egit.github.core;
public class Stats {
private int additions;
private int deletions;
private int total;
public int getAdditions() {
return additions;
}
public void setAdditions(int additions) {
this.additions = additions;
}
public int getDeletions() {
return deletions;
}
public void setDeletions(int deletions) {
this.deletions = deletions;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment