Skip to content

Commit

Permalink
fix: use qs
Browse files Browse the repository at this point in the history
  • Loading branch information
adelkahomolova committed Dec 6, 2019
1 parent 46a7a31 commit e324c1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/git/GitHubService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ export class GitHubService implements IVCSService {
async getRepoCommits(owner: string, repo: string, sha?: string): Promise<Paginated<Commit>> {
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);
Expand Down

0 comments on commit e324c1f

Please sign in to comment.