Add workflow to catch common PR mistakes #4438
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a workflow that will fail on the following:
class="instructions"
paragraphs (this is a sign that template content in a new Technique or Understanding page hasn't been fully replaced)guidelines
and other content in the same PR (since we typically want to separate changes that generate errata)I have performed extensive testing on my fork. Here are examples:
class="instructions"
guidelines
changesI have intentionally made this run as a single job so that it adds only 1 line to checks rather than 5 (since Netlify already adds 4 itself). I could foresee us adding even more checks in the future as well, and I really wouldn't want the Checks list to grow that long.
Example of what the check will look like:
Example of what annotations look like upon failure:
The annotations can be found by expanding the "Annotations" section at the top of the job view (which is what clicking the failure in the PR's Checks section will navigate to), or at the bottom of the check's Summary view.
(Note: Within the job's logs, only the "Reflect status" job will actually show an error icon, because the previous steps can't actually cause errors or else it will exit early. And the alternative to that would be spawning 5 separate checks instead of 1, which would then crowd the Checks section in the PR itself.)