Skip to content

Commit

Permalink
Renamed getMasterBranch to getDefaultBranch
Browse files Browse the repository at this point in the history
The new set method can be simply renamed without the backward
compatibility version since it's new
  • Loading branch information
kohsuke committed Jul 17, 2015
1 parent e4de09c commit eb9551d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,14 @@ public Date getPushedAt() {
* @return
* This field is null until the user explicitly configures the master branch.
*/
public String getDefaultBranch() {
return default_branch;
}

/**
* @deprecated
* Renamed to {@link #getDefaultBranch()}
*/
public String getMasterBranch() {
return default_branch;
}
Expand Down Expand Up @@ -494,9 +502,7 @@ public void setHomepage(String value) throws IOException {
edit("homepage",value);
}

public void setMasterBranch(String value) throws IOException {
// This method might be more aptly named setDefaultBranch,
// but we'll use setMasterBranch for consistency with the existing getMasterBranch.
public void setDefaultBranch(String value) throws IOException {
edit("default_branch", value);
}

Expand Down

0 comments on commit eb9551d

Please sign in to comment.