Skip to content

Commit

Permalink
Exposed more endpoints.
Browse files Browse the repository at this point in the history
This fixes issue #64.
  • Loading branch information
kohsuke committed May 10, 2014
1 parent d33609e commit a071f8b
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class GHRepository {
private String description, homepage, name;
private String url; // this is the API url
private String html_url; // this is the UI
private String git_url, ssh_url, clone_url, svn_url;
private GHUser owner; // not fully populated. beware.
private boolean has_issues, has_wiki, fork, has_downloads;
@JsonProperty("private")
Expand Down Expand Up @@ -97,15 +98,29 @@ public String getUrl() {
* This URL is read-only.
*/
public String getGitTransportUrl() {
return "git://github.com/"+getOwnerName()+"/"+name+".git";
return git_url;
}

/**
* Gets the HTTPS URL to this repository, such as "https://github.com/kohsuke/jenkins.git"
* This URL is read-only.
*/
public String gitHttpTransportUrl() {
return "https://github.com/"+getOwnerName()+"/"+name+".git";
return clone_url;
}

/**
* Gets the Subversion URL to access this repository: https://github.com/rails/rails
*/
public String getSvnUrl() {
return svn_url;
}

/**
* Gets the SSH URL to access this repository, such as [email protected]:rails/rails.git
*/
public String getSshUrl() {
return ssh_url;
}

/**
Expand Down

0 comments on commit a071f8b

Please sign in to comment.