From fba7af940fdf1cf199cc526d0826cf91be3f3ba5 Mon Sep 17 00:00:00 2001 From: Adela Homolova Date: Wed, 20 Nov 2019 13:05:37 +0100 Subject: [PATCH] feat: add getRepoCommits into CollaborationInspector --- src/inspectors/CollaborationInspector.ts | 4 ++++ src/inspectors/ICollaborationInspector.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/inspectors/CollaborationInspector.ts b/src/inspectors/CollaborationInspector.ts index d44cb7391..02d520aa9 100644 --- a/src/inspectors/CollaborationInspector.ts +++ b/src/inspectors/CollaborationInspector.ts @@ -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); + } } diff --git a/src/inspectors/ICollaborationInspector.ts b/src/inspectors/ICollaborationInspector.ts index 03b36e5e1..cb326b57c 100644 --- a/src/inspectors/ICollaborationInspector.ts +++ b/src/inspectors/ICollaborationInspector.ts @@ -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>; getPullRequest(owner: string, repo: string, prNumber: number): Promise; getPullCommits(owner: string, repo: string, prNumber: number): Promise>; getPullRequestFiles(owner: string, repo: string, prNumber: number): Promise>; + getRepoCommits(owner: string, repo: string, sha?: string): Promise>; } export enum PullRequestState {