ci: avoid specifying the sha when listingCommits

Some repos default to `main' now for their master branch and this was
causing issues.
This commit is contained in:
Bogdan Popa committed 2020-11-27 19:29:04 +02:00
1 parent a81429b59e
commit b676010a18
1 file changed
+2 -3
+2 -3
View File
@@ -7,15 +7,14 @@ const badgeDefaults = {
label: 'last commit',
}
async function handle(octokit, { owner, repo, sha = 'master' }) {
async function handle(octokit, { owner, repo }) {
let lastCommitDayStr
try {
const { data: commitList } = await Promise.race([
new Promise(resolve => setTimeout(resolve, 10 * 1000)),
octokit.repos.listCommits({
owner,
repo,
sha
repo
})
])
lastCommitDayStr = commitList[0].commit.author.date