mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 02:42:45 +00:00
feat(#200): save the commit date of the anonymized commit
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user