werkator build succeeded after 01:04
The comment lists the reasons from the most to the least severe; `.werkrevisor.toml` allows `mechanical_only`. Details: the PR document under `docs/prs/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: #12 Co-authored-by: claude-code <claude-code@javagil.de>
41 lines
1.4 KiB
Markdown
41 lines
1.4 KiB
Markdown
# PR#12: The comment lists the reasons from the most to the least severe
|
|
|
|
> **WARNING:** This document describes only the change applied in this PR.
|
|
> It may already be outdated once the next PR is merged.
|
|
> Historic PR documentation is not maintained along with new PRs; treat it as a snapshot.
|
|
|
|
## The Problem
|
|
|
|
The comment listed the reasons in the order the rules produced them.
|
|
On PR#11, an ORANGE reason of the classifier stood between YELLOW reasons,
|
|
so a reviewer had to read the whole list to find what blocks the merge.
|
|
|
|
## Non-Goals
|
|
|
|
- No change to the verdicts or to the reasons themselves.
|
|
|
|
## The Scenarios
|
|
|
|
### Feature: the comment shows the blocking reasons first
|
|
|
|
#### Scenario#12.01: the reasons are sorted by severity
|
|
|
|
So that a reviewer sees first what blocks the merge.
|
|
|
|
- **Given** reasons with the verdicts YELLOW, ORANGE, YELLOW and RED, in this order
|
|
- **When** werkrevisor writes the comment
|
|
- **Then** the comment lists RED, then ORANGE, then both YELLOW reasons in their original order
|
|
|
|
##### Verified by
|
|
|
|
- [test_report.ReasonOrderTest.test_reasons_are_listed_from_the_most_to_the_least_severe](../../tests/test_report.py)
|
|
|
|
## The Solution
|
|
|
|
- `render_comment` sorts the reasons by the rank of their verdict, stable and descending.
|
|
- werkrevisor 0.13.1.
|
|
|
|
## Additional Changes
|
|
|
|
- `.werkrevisor.toml` adds `mechanical_only` to `auto_approvable`, now that 0.13.0 runs on mih09.
|