@@ -262,7 +262,7 @@ public Pager<Commit> getCommits(Object projectIdOrPath, String ref, Date since,
262262 * @throws GitLabApiException GitLabApiException if any exception occurs during execution
263263 */
264264 public Commit getCommit (Object projectIdOrPath , String sha ) throws GitLabApiException {
265- Response response = get (Response .Status .OK , getDefaultPerPageParam (), "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "commits" , sha );
265+ Response response = get (Response .Status .OK , getDefaultPerPageParam (), "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "commits" , urlEncode ( sha ) );
266266 return (response .readEntity (Commit .class ));
267267 }
268268
@@ -314,7 +314,7 @@ public List<CommitRef> getCommitRefs(Object projectIdOrPath, String sha, CommitR
314314 Form form = new GitLabApiForm ()
315315 .withParam ("type" , refType )
316316 .withParam (PER_PAGE_PARAM , getDefaultPerPage ());
317- Response response = get (Response .Status .OK , form .asMap (), "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "commits" , sha , "refs" );
317+ Response response = get (Response .Status .OK , form .asMap (), "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "commits" , urlEncode ( sha ) , "refs" );
318318 return (response .readEntity (new GenericType <List <CommitRef >>(){}));
319319 }
320320
0 commit comments