From 543f67353bea66201b1f7a3f7cc7138ee7af7e21 Mon Sep 17 00:00:00 2001
From: Stefan Hansson <newbyte@postmarketos.org>
Date: Sat, 8 Mar 2025 22:59:22 +0100
Subject: [PATCH] CI: Check all commit messages for string (MR 6301)

This way you can add e.g. [ci:skip-vercheck] to the commit it actually
belongs to instead of having to add it to the last one in the series,
which is unintuitive. It still doesn't only run the check on commits
that contain the message, which might be a nice future improvement.
---
 .ci/lib/common.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.ci/lib/common.py b/.ci/lib/common.py
index 76701596a69..710d3c40188 100755
--- a/.ci/lib/common.py
+++ b/.ci/lib/common.py
@@ -41,7 +41,9 @@ def add_upstream_git_remote():
 
 
 def commit_message_has_string(needle):
-    return needle in run_git(["show", "-s", "--format=full", "HEAD"])
+    base_commit = get_base_commit()
+
+    return needle in run_git(["log", "--pretty=format:%B", f"{base_commit}..HEAD"])
 
 
 def run_pmbootstrap(parameters):
-- 
GitLab