From e324c1fb83828986c8c036aecc76b7b973e53930 Mon Sep 17 00:00:00 2001 From: Adela Homolova Date: Fri, 6 Dec 2019 15:56:36 +0100 Subject: [PATCH] fix: use qs --- src/services/git/GitHubService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/git/GitHubService.ts b/src/services/git/GitHubService.ts index 8741fe2ed..bd86c7b3e 100644 --- a/src/services/git/GitHubService.ts +++ b/src/services/git/GitHubService.ts @@ -182,7 +182,8 @@ export class GitHubService implements IVCSService { async getRepoCommits(owner: string, repo: string, sha?: string): Promise> { let url = 'GET /repos/:owner/:repo/commits'; if (sha !== undefined) { - url = `${url}?state=${sha}`; + const stateForUri = qs.stringify({ state: sha }, { addQueryPrefix: true }); + url = `${url}${stateForUri}`; } const response = await this.paginate(url, owner, repo);