Code quality findings
How the GitHub Code Quality findings checklist reads GitHub's findings on the lines a pull request changes, and the permission it needs.
The GitHub Code Quality findings checklist posts GitHub Code Quality's open findings that sit on the lines a pull request changes. It's a script checklist, so it makes no model call.
Before you add it
- GitHub Code Quality must be on for the repo. It's a paid GitHub feature for organization repos on GitHub Team and Enterprise Cloud.
- The installation must approve the app's Code quality permission. The account's admin sees it under Permissions to review until then.
- It's in the Strict review template. For any other review, add it to the automation under What it looks for.
What it reads
- The action asks the Axon Shaft API for the findings, with the run's OIDC token and an empty body. Nothing from the checkout or the diff is sent.
- The API reads the repo's open findings from GitHub with a token only it holds, for that repo and Code quality (read) alone, up to 500 findings.
- The action keeps the findings whose first line falls inside a changed part of the base file, and reports each at the first line of that part in the pull request.
What a finding looks like
- GitHub's
errorfindings are should fix, and the rest are nits. - The text is GitHub's message, then the finding's number, such as "Finding #12 on the default branch, under the repo's Security and quality tab, Code quality."
- GitHub gives no page for a single finding, so it has no link.
When it's skipped
Code Quality's findings are the default branch's, so a pull request into another branch skips the checklist and says so.
When the API can't read them, because Code Quality isn't on for the repo or the installation hasn't approved Code quality (read), the checklist is skipped with the reason, and never passes. The reason is code_quality_failed.
Last updated on