Workflow to comment with code review checklists on PRs.#16472
Workflow to comment with code review checklists on PRs.#16472stephaniehobson wants to merge 2 commits intomainfrom
Conversation
Checklist amendments
|
Thank you for your pull request. Based on the contents you may need to double-check these things: 📊 Analytics ChecklistLinks
|
I don't see this behaviour in there any more - was it dropped? Also, I guess it'd be good to put the docs in mozmeao/platform-docs now instead |
| - [ ] Can still use [other prefix conventions](https://protocol.mozilla.org/docs/contributing/naming) | ||
| - [ ] Prefer classes over element selectors or IDs | ||
| - [ ] Use mixins and design tokens when available | ||
| - [ ] No commented out code |
There was a problem hiding this comment.
This is all looking great! 🥇 One best practice CSS suggestion (non-blocking)
| - [ ] No commented out code | |
| - [ ] No commented out code | |
| - [ ] Prefer top-level classes (avoid unnecessary nesting or specificity) |
|
Hm. I guess I need to break up the docs changes and put them in platform-docs but keep the workflow here and in springfield. |
|
Would it be feasible to catch inline style attributes in HTML and JS and remind the author to check the CSP limits do not break that for them? |
| [[ "${{ steps.checklists.outputs.css }}" == "true" ]] && append_checklist "🧾 CSS Checklist" "docs/docs/checklists/css.md" | ||
| [[ "${{ steps.checklists.outputs.analytics }}" == "true" ]] && append_checklist "📊 Analytics Checklist" "docs/docs/checklists/analytics.md" | ||
| [[ "${{ steps.checklists.outputs.l10n }}" == "true" ]] && append_checklist "🌍 L10n Checklist" "docs/docs/checklists/l10n.md" | ||
| [[ "${{ steps.checklists.outputs.experiment }}" == "true" ]] && append_checklist "🧪 Experiment Checklist" "docs/docs/checklists/experiment.md" |
There was a problem hiding this comment.
For some reason the example comment above shows an empty "🧪 Experiment Checklist" (the idea is for sections without any content to stay hidden right?)
|
Idea: if any |
| @@ -0,0 +1,37 @@ | |||
| - [ ] No hard coded English strings remain in the template file | |||
| - Pay special attention to hidden text like `alt` and `.visually-hidden` | |||
| - [ ] All Fluent IDs referenced exist in the Fluent file | |||
There was a problem hiding this comment.
Good tip from Steve:
run ./manage.py l10n_update or make preflight -- --retain-db after the work is done but before you PR to ensure you're not still working with now-stale Fluent files
One-line summary
Workflow to comment with code review checklists on PRs.
Significant changes and points to review
The idea is to create a GitHub workflow which will post appropriate checklists in a comment when a pull request is opened if some file types have been added. So, these are a little general in places. But, I'm hoping they can help keep our code base consistent-ish as we have more new developers contributing.
The conditions where the checklists should post are:
experimentin the nameexperiment_viewvariations = [and the array is not empty=> each condition should only trigger relevant checks
Add checklists for:
Did a bit of markdown cleanup too.
Issue / Bugzilla link
n/a
Testing
You can see an earlier version of the script at work on the pulls here: https://github.com/stephaniehobson/bedrock/pulls
I'll re-run with the most recent version of the script tomorrow.