GitHub pull request descriptions are rendered as a comment. Comment
titles, which include the PR author, render in a h3. Hence, titles
within the comment body should be header level 4. This makes pull
request descriptions more accessible to screen readers.
Added a top-level directory in the zip archive that is the commit
hash which makes it easier when downloading multiple artifacts
for comparison. Updated the filenames of screenshots for easier
comparison between different cases. Added that an error is
raised if no screenshots uploaded in workflow.
Running `oxipng` over a set of screenshots from a previous run that were
1.9M in size resulted in a total size of 1.3M, a 31.5% reduction.
This can be useful to reduce the artifact size stored in GitHub and
locally if downloading screenshots from multiple runs.
See https://til.simonwillison.net/github-actions/oxipng
The id was used when we attempted to update comments in an early
version of the feature. Also removed the job summary as it
doesn't have the value that it did in the original version of
the feature.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Paolo Melchiorre <paolo@melchiorre.org>
Co-authored-by: Adam Johnson <me@adamj.eu>
The original event trigger pull_request_target runs against the target branch (main), not the branch associated with the PR. Consequently, any new screenshots added in a PR are not captured, and the available screenshots reflect the state of the main branch code, not the code from the PR's branch.
This update addresses the issue by changing the event trigger to pull_request. However, it's important to note that this adjustment breaks the comments functionality since the action no longer has write permissions.
This adds:
- GitHub actions,
- tox configuration,
- pre-commit hook, and
- makefile rules
to run blacken-docs linter.
Co-authored-by: David Smith <smithdc@gmail.com>