From b676010a18b5ee197710a61ee4930bb40f2574df Mon Sep 17 00:00:00 2001 From: Bogdan Popa Date: Fri, 27 Nov 2020 19:28:23 +0200 Subject: [PATCH] ci: avoid specifying the sha when listingCommits Some repos default to `main' now for their master branch and this was causing issues. --- .github/actions/update-badge/endpoint.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/update-badge/endpoint.js b/.github/actions/update-badge/endpoint.js index 7089e08d..4d7cd2d2 100644 --- a/.github/actions/update-badge/endpoint.js +++ b/.github/actions/update-badge/endpoint.js @@ -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