mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
Noting possible TODO for the future
This commit is contained in:
@@ -766,6 +766,8 @@ public class GHRepository extends GHObject {
|
||||
*/
|
||||
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