Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize previous_file field in GHCommit.File #187

Merged
merged 1 commit into from
Jul 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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