Compare commits

...

6 Commits

Author SHA1 Message Date
Kohsuke Kawaguchi
5d5c6cf71c [maven-release-plugin] prepare release github-api-1.79 2016-10-24 19:23:14 -07:00
Kohsuke Kawaguchi
89aac45f41 Merge pull request #299 2016-10-24 19:15:46 -07:00
Kohsuke Kawaguchi
4965fd5f4c Noting possible TODO for the future 2016-10-24 19:15:38 -07:00
Kohsuke Kawaguchi
87fbb8ec98 Copy/paste error 2016-10-24 19:07:32 -07:00
Kohsuke Kawaguchi
0d92d4ba61 [maven-release-plugin] prepare for next development iteration 2016-10-24 14:10:35 -07:00
Ben Sheats
5334cb8688 url encode hashes in ref names 2016-10-21 11:40:01 -04:00
3 changed files with 7 additions and 3 deletions

View File

@@ -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>

View File

@@ -52,7 +52,7 @@ public class GHCommit {
}
public Date getCommitDate() {
return GitHub.parseDate(author.date);
return GitHub.parseDate(committer.date);
}
/**

View File

@@ -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);
}
/**