This is part of a series of posts where I refactor code from StackOverflow questions, with a discussion of the changes. One of the great things about JavaScript is how scalable it is. You can start with a simple script, and there is nothing wrong with that. Usually these posts are about refactorings other than what the questioner asked about, and would be out of scope for the SO answer.
Recently, I spent some time on StackOverflow, helping people with their school assignments - I mean, serious programming questions they had at work. (I’m pretty sure a fair whack of them were homework assignments).
GitHub Actions are small, reusable modules of functionality that can participate in GitHub Workflows. You can add a GitHub workflow yaml file to any GitHub repo, and have it run in response to events like code pushes, pull requests - even arbitrary events posted to the repository’s repository_dispatch
REST endpoint over the GitHub API.