feat(#200): save the commit date of the anonymized commit

This commit is contained in:
tdurieux
2023-04-25 23:40:12 +02:00
parent c9acb7b899
commit 7e2c490e4b
6 changed files with 39 additions and 3 deletions

View File

@@ -44,6 +44,21 @@ export class GitHubRepository {
return this._data.size;
}
async getCommitInfo(
sha: string,
opt: {
accessToken?: string;
}
) {
const octokit = new Octokit({ auth: opt.accessToken });
const commit = await octokit.repos.getCommit({
owner: this.owner,
repo: this.repo,
ref: sha,
});
return commit.data;
}
async branches(opt: {
accessToken?: string;
force?: boolean;