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

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

No files matched your search

+15
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;