From e8d9b259aacf21c4c02864dc6543b115cc6103c7 Mon Sep 17 00:00:00 2001 From: Bogdan Popa Date: Wed, 17 Nov 2021 09:24:09 +0200 Subject: [PATCH] ci: drop shouldUpdate check --- .github/actions/update-badge/index.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/actions/update-badge/index.js b/.github/actions/update-badge/index.js index f8d7bc1f..49de86d9 100644 --- a/.github/actions/update-badge/index.js +++ b/.github/actions/update-badge/index.js @@ -20,10 +20,8 @@ let octokit await core.group('Fetching repositories & updating lines...', async () => { for (const repo of repos) { const line = await generateLine(repo.repoStr) - if (shouldUpdate(lines[repo.index], line)) { - core.debug(`Updated line: '${line}'`) - lines[repo.index] = line - } + core.debug(`Updated line: '${line}'`) + lines[repo.index] = line } }) @@ -77,8 +75,3 @@ async function generateBadge(repoStr) { .map(s => encodeURIComponent(s.replace(/\-/g, '--'))) .join('-') } - -function shouldUpdate(oldLine, newLine) { - const badDateReg = /red\)$/ - return badDateReg.test(oldLine) || !badDateReg.test(newLine) -}