mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-11 00:11:25 +00:00
Compare commits
6 Commits
github-api
...
github-api
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d5c6cf71c | ||
|
|
89aac45f41 | ||
|
|
4965fd5f4c | ||
|
|
87fbb8ec98 | ||
|
|
0d92d4ba61 | ||
|
|
5334cb8688 |
4
pom.xml
4
pom.xml
@@ -7,7 +7,7 @@
|
||||
</parent>
|
||||
|
||||
<artifactId>github-api</artifactId>
|
||||
<version>1.78</version>
|
||||
<version>1.79</version>
|
||||
<name>GitHub API for Java</name>
|
||||
<url>http://github-api.kohsuke.org/</url>
|
||||
<description>GitHub API for Java</description>
|
||||
@@ -16,7 +16,7 @@
|
||||
<connection>scm:git:git@github.com/kohsuke/${project.artifactId}.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com/kohsuke/${project.artifactId}.git</developerConnection>
|
||||
<url>http://${project.artifactId}.kohsuke.org/</url>
|
||||
<tag>github-api-1.78</tag>
|
||||
<tag>github-api-1.79</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
|
||||
@@ -52,7 +52,7 @@ public class GHCommit {
|
||||
}
|
||||
|
||||
public Date getCommitDate() {
|
||||
return GitHub.parseDate(author.date);
|
||||
return GitHub.parseDate(committer.date);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -765,6 +765,10 @@ public class GHRepository extends GHObject {
|
||||
* invalid ref type being requested
|
||||
*/
|
||||
public GHRef getRef(String refName) throws IOException {
|
||||
// hashes in branch names must be replaced with the url encoded equivalent or this call will fail
|
||||
// FIXME: how about other URL unsafe characters, like space, @, : etc? do we need to be using URLEncoder.encode()?
|
||||
// OTOH, '/' need no escaping
|
||||
refName = refName.replaceAll("#", "%23");
|
||||
return root.retrieve().to(String.format("/repos/%s/%s/git/refs/%s", owner.login, name, refName), GHRef.class).wrap(root);
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user