Update expect command-line
Shipped in v0.0.21
Background
There's an optional feature that lets users ask @check-spelling-bot to update the expect files on the PR directly.
Previously the action generated a shell command that runs perl that users can use to update their expect file(s). And if a commit/branch results in no new spelling errors, the output is sent to a log. While it might be possible to get the log to be consumable by the bot, it would have been a non-trivial amount of work.
A lot of users were hoping for a stable script one could get from the check-spelling repository which could consume the expect updates and apply them.
Goals
☑ Support URLs pointing to Markdown flavored comments
☑ Support URLs pointing to GitHub action check logs
☑ Support simple lists of adds/removes
☑ Support excludes
☑ Support spell-check-this
☑ Support private repositories (you can't use curl
to retrieve content from these w/o a token, and I don't want to task users for a token)
☑ Enable switching from using a comment
to using github_step_summary
☑ Switch reported shell script / logged shell script to use this script instead
☑ Support running on Windows
Design choices
-
The Windows goal means the script itself would want to be pure
perl
, and the program could be run asperl apply.pl ARGS...
-
Retrieving the data will validate
gh
is present and authorized (gh
insists on being logged in for most (all?) operations). -
Retrieving the script will assume
curl
is present to have it retrieve the script. -
The command assumes
perl
is in the path. -
Unconditionally replace the script each time it runs. If run from a file it will check to see if it's stale.
Status
☑ main
generates something like `curl -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/prerelease/apply.pl' |
perl - 'https://github.com/check-spelling/lit/actions/runs/3319354094/attempts/1'`
☑ main
talk-to-bot can handle such a url
- [x]
main
validates that the url corresponds to its PR - [x]
main
consumes the url (and handle errors) ☑main
generates comments of this form
FAQ | Showcase | Event descriptions | Configuration information | Known Issues | Possible features | Deprecations | Release notes | Helpful scripts