Skip to content

Commit

Permalink
Merge pull request #187 from yegorius/master
Browse files Browse the repository at this point in the history
Recognize previous_file field in GHCommit.File
  • Loading branch information
kohsuke committed Jul 17, 2015
2 parents cb22488 + 626909a commit 15e4d07
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/org/kohsuke/github/GHCommit.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public static class Stats {
public static class File {
String status;
int changes,additions,deletions;
String raw_url, blob_url, filename, sha, patch;
String raw_url, blob_url, sha, patch;
String filename, previous_filename;

/**
* Number of lines added + removed.
Expand Down Expand Up @@ -101,12 +102,19 @@ public String getStatus() {
}

/**
* Just the base name and the extension without any directory name.
* Full path in the repository.
*/
public String getFileName() {
return filename;
}

/**
* Previous path, in case file has moved.
*/
public String getPreviousFilename() {
return previous_filename;
}

/**
* The actual change.
*/
Expand Down

0 comments on commit 15e4d07

Please sign in to comment.