Answer principles round 1: 1 🔴, 1 🟡 (0 misread); count a fixed finding at the cap as done, and keep the Stage 0 rerun in its round
This commit is contained in:
+1
-1
@@ -81,7 +81,7 @@ def default_ref(cwd: str | None = None, timeout: float | None = None, guarded: b
|
||||
def branch_titles(default: str, cwd: str | None = None, timeout: float | None = None, guarded: bool = False) -> list[str] | Failure:
|
||||
"""The titles of the branch's own commits since default, newest first, read in cwd, else in the current directory.
|
||||
|
||||
--first-parent leaves out the commits a merge brought in, such as another chunk's rounds merged in from a default branch the checkout last fetched before them."""
|
||||
--first-parent leaves out the commits a merge brought in, such as those of a default branch newer than the one the checkout last fetched."""
|
||||
titles = git("log", "--first-parent", "--format=%s", f"{default}..HEAD", cwd=cwd, timeout=timeout, guarded=guarded)
|
||||
return titles if isinstance(titles, Failure) else titles.splitlines()
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ def round_cap_breaches(commit: Commit) -> list[Breach]:
|
||||
if not any(ROUND.match(message) for message in commit.messages):
|
||||
return []
|
||||
earlier = earlier_titles(commit.directory, commit.amends)
|
||||
return [Breach("round-cap", f"the pass has had its {CAP} rounds; merge once the gate passes, with no round after them", commit.directory)] if any(past_cap(message, earlier) for message in commit.messages) else []
|
||||
if not any(past_cap(message, earlier) for message in commit.messages):
|
||||
return []
|
||||
return [Breach("round-cap", f"the pass has had its {CAP} rounds; merge once the gate passes, with no round after them", commit.directory)]
|
||||
|
||||
|
||||
def earlier_titles(directory: str, amends: bool) -> list[str]:
|
||||
|
||||
Reference in New Issue
Block a user