()
| 66 | |
| 67 | const firstCommit = new CachedFunction('first-commit', { |
| 68 | async updater(): Promise<[committedDate: string, lastCommitsPageUrl: string]> { |
| 69 | const {repository} = await api.v4(GetFirstCommit); |
| 70 | |
| 71 | const {oid: commitSha, history, committedDate} = repository.defaultBranchRef.target as CommitTarget; |
| 72 | const commitsCount = history.totalCount; |
| 73 | if (commitsCount === 1) { |
| 74 | const lastCommitsPageUrl = buildLastCommitsPageUrl(commitSha, commitsCount); |
| 75 | return [committedDate, lastCommitsPageUrl]; |
| 76 | } |
| 77 | |
| 78 | return getRepoAge(commitSha, commitsCount); |
| 79 | }, |
| 80 | cacheKey: cacheByRepo, |
| 81 | }); |
| 82 |
nothing calls this directly
no test coverage detected