From 2ea25e9f74a0dcae2b81300b391f97dd126c4a38 Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Thu, 5 Feb 2026 12:41:37 +0000 Subject: [PATCH 1/3] Templating: don't check the users who posted reviews. --- templates/_templating_scripting.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/_templating_scripting.py b/templates/_templating_scripting.py index 4f6df10..506bb52 100755 --- a/templates/_templating_scripting.py +++ b/templates/_templating_scripting.py @@ -227,9 +227,6 @@ def prompt_share(args: argparse.Namespace) -> None: # Can use a URL here for local debugging: # pr_number = "https://github.com/SciTools/iris/pull/6901" - # current_user = gh_json("api user")["login"] - current_user = "scitools-ci" # Temporary testing patch. - body = gh_json(f"pr view {pr_number}", "body")["body"] if MAGIC_NO_PROMPT.search(body): print( @@ -275,8 +272,7 @@ def post_review(review_body: str, review_type: ReviewType) -> None: existing_reviews = json.loads(check_output(shlex.split(gh_command))) reviews_to_edit = [ review for review in existing_reviews - if review["user"]["login"] == current_user - and review["body"].startswith(TEMPLATING_HEADING) + if review["body"].startswith(TEMPLATING_HEADING) ] if reviews_to_edit: # Edit the last existing review. From 28d988e80067d1a8374a664debbdf9eab40bdda5 Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Thu, 5 Feb 2026 13:39:17 +0000 Subject: [PATCH 2/3] Add a templating watermark. --- templates/_templating_scripting.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/_templating_scripting.py b/templates/_templating_scripting.py index 506bb52..e13a022 100755 --- a/templates/_templating_scripting.py +++ b/templates/_templating_scripting.py @@ -30,7 +30,10 @@ "app/pre-commit-ci", "app/scitools-ci", ] -TEMPLATING_HEADING = f"## [Templating]({SCITOOLS_URL}/.github/blob/main/templates)" +TEMPLATING_HEADING = ( + "[TEMPLATING WATERMARK]: #\n\n" + f"## [Templating]({SCITOOLS_URL}/.github/blob/main/templates)" +) _MAGIC_PREFIX = "@scitools-templating: please" MAGIC_NO_PROMPT = re.compile(rf"{_MAGIC_PREFIX} no share prompt", re.IGNORECASE) From 1fe81dae2489533ecddd603a2038697f11d180af Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Fri, 6 Feb 2026 16:33:08 +0000 Subject: [PATCH 3/3] Add noreply@github.com to the BOTS list. --- templates/_templating_scripting.py | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/_templating_scripting.py b/templates/_templating_scripting.py index e13a022..5a4940d 100755 --- a/templates/_templating_scripting.py +++ b/templates/_templating_scripting.py @@ -29,6 +29,7 @@ "pre-commit-ci[bot]", "app/pre-commit-ci", "app/scitools-ci", + "web-flow", ] TEMPLATING_HEADING = ( "[TEMPLATING WATERMARK]: #\n\n"