Skip to content

Commit

Permalink
fix: add getRepoCommits() into interface,
Browse files Browse the repository at this point in the history
fix: add return type
  • Loading branch information
adelkahomolova committed Nov 27, 2019
1 parent fba7af9 commit 8b544ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/bitbucket/BitbucketService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export class BitbucketService implements ICVSService {
throw new Error('Method not implemented yet.');
}

async getRepoCommits(owner: string, repo: string) {
async getRepoCommits(owner: string, repo: string): Promise<Paginated<Commit>> {
throw new Error('Method not implemented yet.');
}

Expand Down
2 changes: 1 addition & 1 deletion src/services/git/GitHubService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class GitHubService implements ICVSService {
*
* Sha can be SHA or branch name.
*/
async getRepoCommits(owner: string, repo: string, sha?: string) {
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}`;
Expand Down
1 change: 1 addition & 0 deletions src/services/git/ICVSService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface ICVSService {
getPullRequestReviews(owner: string, repo: string, prNumber: number): Promise<Paginated<PullRequestReview>>;
getPullRequestFiles(owner: string, repo: string, prNumber: number): Promise<Paginated<PullFiles>>;
getPullRequest(owner: string, repo: string, prNumber: number): Promise<PullRequest>;
getRepoCommits(owner: string, repo: string, sha?: string): Promise<Paginated<Commit>>;
getCommit(owner: string, repo: string, commitSha: string): Promise<Commit>;
getContributors(owner: string, repo: string): Promise<Paginated<Contributor>>;
getContributorsStats(owner: string, repo: string): Promise<Paginated<ContributorStats>>;
Expand Down

0 comments on commit 8b544ef

Please sign in to comment.