webdev-infra
webdev-infra copied to clipboard
Revamp GitHub review bot
The former review bot based on a Glitch backend is currently broken, probably due to auth issues. Before fixing it, it might be good to outweigh wether moving to a GitHub action that can be shared for both web.dev and developer.chrome.com might be the better approach.
When doing this we should also re-evaluate the current set of rules, think about worthwhile additions (like enforcing thumbnail images for blog posts) and probably implement spell-checking (see https://github.com/GoogleChrome/developer.chrome.com/pull/5354#issue-1590144636 for recommendations).
One linting rule that would be good to have is to check for linking to failing hrefs. Also see https://github.com/GoogleChrome/developer.chrome.com/pull/5496.
Former review bot is GoogleChromeLabs/chrome-devrel-review-bot, yeah? Must be, just ran across https://github.com/GoogleChromeLabs/chrome-devrel-review-bot/issues/20
In terms of linting / formatting Markdown files, some options taken from oxsecurity/megalinter docs/descriptors/markdown.md:
- DavidAnson/markdownlint
- GH Action: DavidAnson/markdownlint-cli2-action
- CLIs: igorshubovych/markdownlint-cli, DavidAnson/markdownlint-cli2
- VS Code Extension: DavidAnson/vscode-markdownlint
- remarkjs/remark-lint
- Can be extended to support different flavors of Markdown
- Various integrations
- GH Action starting point
- tcort/markdown-link-check
- nvuillam/markdown-table-formatter
PS: one of my motivations for suggesting linting / formatting Markdown: I had to "Save without Formatting" in VS Code to avoid making lots of spurious formatting changes when working on https://github.com/GoogleChrome/developer.chrome.com/pull/5354. Surely I could turn off formatting for that repo somehow in VS Code, but it would be so much nicer to just have an official linter / formatter, so contributors don't have to examine several files to try to work out how things ought to be formatted before opening a PR. I didn't have to do that, but I've done it many times on other repos with inconsistent formatting, in an attempt to streamline the PR review process.