Skip to content

Commit

Permalink
feat: add getRepoCommits into CollaborationInspector
Browse files Browse the repository at this point in the history
  • Loading branch information
adelkahomolova committed Nov 27, 2019
1 parent dca5707 commit fba7af9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/inspectors/CollaborationInspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ export class CollaborationInspector implements ICollaborationInspector {
async getPullCommits(owner: string, repo: string, prNumber: number) {
return this.service.getPullCommits(owner, repo, prNumber);
}

async getRepoCommits(owner: string, repo: string, sha?: string) {
return this.service.getRepoCommits(owner, repo, sha);
}
}
3 changes: 2 additions & 1 deletion src/inspectors/ICollaborationInspector.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Paginated } from './common/Paginated';
import { PullCommits, PullFiles, PullRequest } from '../services/git/model';
import { PullCommits, PullFiles, PullRequest, Commit } from '../services/git/model';

export interface ICollaborationInspector {
getPullRequests(owner: string, repo: string): Promise<Paginated<PullRequest>>;
getPullRequest(owner: string, repo: string, prNumber: number): Promise<PullRequest>;
getPullCommits(owner: string, repo: string, prNumber: number): Promise<Paginated<PullCommits>>;
getPullRequestFiles(owner: string, repo: string, prNumber: number): Promise<Paginated<PullFiles>>;
getRepoCommits(owner: string, repo: string, sha?: string): Promise<Paginated<Commit>>;
}

export enum PullRequestState {
Expand Down

0 comments on commit fba7af9

Please sign in to comment.