From 7e141eaa1ec7af590ad32f9e94354ce0fef4d8a7 Mon Sep 17 00:00:00 2001 From: Lilleman Date: Thu, 19 Nov 2026 18:07:54 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?= =?UTF-8?q?=203=20=F0=9F=9F=A1=20(0=20misread);=20reword=20the=20approval?= =?UTF-8?q?=20docstring=20and=20tell=20the=20worker=20it=20awaited=20a=20p?= =?UTF-8?q?erson's=20merge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/chunk_pr/approval.py | 4 ++-- bin/project_config/settings.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/chunk_pr/approval.py b/bin/chunk_pr/approval.py index e34735b1..5e03c0da 100644 --- a/bin/chunk_pr/approval.py +++ b/bin/chunk_pr/approval.py @@ -12,8 +12,8 @@ WAIT_SECONDS = 90 * 60 PARKS = "CHUNK_PR_PARKS" -def awaited(forge: Forge, wait_for_approval: bool, by_human: bool = False) -> bool | Failure: - """Whether merge waits for an approval: the project config's `wait-for-approval`, and never where a person merges the pull request (by_human), who sees its approval themselves. chunk-pr reads approvals on GitHub only, so a Gitea project that sets it fails, and merge never skips an approval the config requires.""" +def awaited(forge: Forge, wait_for_approval: bool, by_human: bool) -> bool | Failure: + """Whether merge waits for an approval. Never where a person merges the pull request (by_human): that person reads its approvals. Otherwise as the project config's `wait-for-approval` says; chunk-pr reads approvals on GitHub only, so a Gitea project that sets it fails, and the chunk never merges past an approval the config requires.""" if by_human: return False if wait_for_approval and forge != "gh": diff --git a/bin/project_config/settings.py b/bin/project_config/settings.py index 5f13163f..e2dc1946 100644 --- a/bin/project_config/settings.py +++ b/bin/project_config/settings.py @@ -33,7 +33,7 @@ Notifier = typing.Literal["mattermost", "slack"] NOTIFIERS: tuple[Notifier, ...] = typing.get_args(Notifier) # An optional boolean setting: whether `chunk-pr merge` waits for a human's approval of the pull request. False where left out. WAIT_FOR_APPROVAL = "wait-for-approval" -# An optional setting: who merges a chunk's pull request, one of MERGERS. The chunk does where it is left out; under "human", `chunk-pr merge` leaves the pull request ready for a person to merge, for a team whose rules keep the merge with a person. +# An optional setting: who merges a chunk's pull request, one of MERGERS; the chunk where it is left out. MERGE = "merge" Merger = typing.Literal["chunk", "human"] MERGERS: tuple[Merger, ...] = typing.get_args(Merger)