59 lines
2.1 KiB
Markdown
59 lines
2.1 KiB
Markdown
# PR#97: A hint on a file outside the diff holds no merge
|
|
|
|
> **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.
|
|
|
|
## Problem
|
|
|
|
[werkbaum PR#9](https://git.javagil.de/mi/werkbaum/pulls/9) was GREEN, but its merge waited for a hint on `docs/CHANGELOG.md`,
|
|
a file that the PR does not change.
|
|
Such a hint cannot be a line comment, so nobody can resolve it;
|
|
only an answer in a PR comment and a restart of the review released the merge.
|
|
PR#95 made the note say so, but the hint still cost a round of the human.
|
|
|
|
## Non-Goals
|
|
|
|
- No change for a hint that Gitea refused as a line comment, or for writing rule violations beyond the 10 line comments;
|
|
both are on changed lines and still hold the merge.
|
|
- No change for a YELLOW, ORANGE or RED finding outside the diff: it still sets the verdict and waits for the human.
|
|
|
|
## Specification
|
|
|
|
### Feature: a GREEN hint outside the diff holds no merge
|
|
|
|
#### Scenario#97.01: a hint on a file that the PR does not change
|
|
|
|
So that a hint that nobody can resolve as a line comment costs no round.
|
|
|
|
- **Given** a GREEN review with one hint on a file that the PR does not change
|
|
- **When** werkrevisor decides on the merge
|
|
- **Then** the result comment shows the hint and the merge is scheduled
|
|
|
|
##### Verified by
|
|
|
|
- [test_hints_hold_merge.HintsHoldTheMergeTest.test_a_hint_outside_the_diff_holds_no_merge](../../tests/test_hints_hold_merge.py)
|
|
|
|
## Solution
|
|
|
|
`_plan_line_comments` puts a GREEN finding on a file outside the diff into the set of hints
|
|
that stand only in the result comment and hold nothing, like a hint on documentation.
|
|
That set is renamed from `doc_hints` to `free_hints`.
|
|
|
|
## Open Questions
|
|
|
|
None.
|
|
|
|
## Additional Changes
|
|
|
|
- The tests of Scenario#95.01 and #95.02 now use a finding without a line, which still holds the merge,
|
|
and are renamed accordingly.
|
|
|
|
## Prerequisite PRs
|
|
|
|
- [werkrevisor PR#95](https://git.javagil.de/mi/werkrevisor/pulls/95): the note of a held merge names hints outside the diff.
|
|
|
|
## Follow-up PRs
|
|
|
|
None.
|