@@ -262,7 +262,7 @@ public Pager<Commit> getCommits(Object projectIdOrPath, String ref, Date since,
262
262
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
263
263
*/
264
264
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 ) );
266
266
return (response .readEntity (Commit .class ));
267
267
}
268
268
@@ -314,7 +314,7 @@ public List<CommitRef> getCommitRefs(Object projectIdOrPath, String sha, CommitR
314
314
Form form = new GitLabApiForm ()
315
315
.withParam ("type" , refType )
316
316
.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" );
318
318
return (response .readEntity (new GenericType <List <CommitRef >>(){}));
319
319
}
320
320
0 commit comments