Bogdanp / awesome-advent-of-code

A collection of awesome resources related to the yearly Advent of Code challenge.
2.85k stars 878 forks source link

Rewrite update-badge action #1838

Closed ndunnett closed 4 months ago

ndunnett commented 4 months ago

This rewrite changes how the action queries the GitHub API to drastically reduce the request rate, this allows processing multiple files so now the markdown files for all years can be updated rather than just the current year. See issue #1837 for context.

Dependency/version changes:

Code changes:

Apologies if I messed anything up, I ran the CI and did some testing locally and it seems to be working as intended. I'm not quite proficient at JS, it's not exactly my lang of choice. :satisfied:

ndunnett commented 4 months ago

Fixed an edge case where if people added an external repo and didn't put a slash in the link title it would break the link and change the repo name to undefined. Example: 2022.md under M4, repo aoc_eblake. This was a pre-existing bug but probably never mattered because the repos in question were added to files that weren't processed in CI before. Also simplified the file parsing to reduce the amount of if/else nesting.

Bogdanp commented 4 months ago

Looks great! Thank you so much!