diff --git a/.github/actions/update-badge/index.js b/.github/actions/update-badge/index.js index 98a4a5dd..7ee9acb7 100644 --- a/.github/actions/update-badge/index.js +++ b/.github/actions/update-badge/index.js @@ -20,7 +20,9 @@ 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)) { + if (otherDomain(lines[repo.index])) { + core.info(`...line refers to non-GH domain: '${lines[repo.index]}'`) + } else if (shouldUpdate(lines[repo.index], line)) { lines[repo.index] = line core.info(`...updated line: '${line}'`) } else { @@ -87,3 +89,8 @@ function shouldUpdate(oldLine, newLine) { !badDateReg.test(newLine) || badDateReg.test(oldLine); } + +function otherDomain(line) { + return line.indexOf("gitlab.com") !== -1 || + line.indexOf("gist.github.com") !== -1; +} diff --git a/README.md b/README.md index 3f77f1f5..80db4310 100644 --- a/README.md +++ b/README.md @@ -373,7 +373,7 @@ Read [CONTRIBUTING.md](/CONTRIBUTING.md) to learn how to add your own repos. *Solutions to AoC in HolyC (TempleOS).* -* [tsoding/aoc-2021](https://github.com/tsoding/aoc-2021) ![Last Commit on GitHub](https://img.shields.io/badge/last%20commit-resource%20not%20available-red) +* [tsoding/aoc-2021](https://gitlab.com/tsoding/aoc-2021) #### Idris @@ -602,7 +602,7 @@ Read [CONTRIBUTING.md](/CONTRIBUTING.md) to learn how to add your own repos. * [plannapus/Advent_of_Code](https://github.com/plannapus/Advent_of_Code) ![Last Commit on GitHub](https://img.shields.io/badge/last%20commit-2021--12--11-brightgreen) * [rrrlw/advent-of-code](https://github.com/rrrlw/advent-of-code) ![Last Commit on GitHub](https://img.shields.io/badge/last%20commit-2021--12--09-brightgreen) * [bigfarts/aoc2021] - + #### Racket *Solutions to AoC in Racket.*