mirror of
https://github.com/tiennm99/awesome-advent-of-code.git
synced 2026-10-15 22:14:42 +00:00
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:
1 file changed
+2
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user