[RFC,v2] utils: checkstyle.py: Accept `Closes` commit trailer
diff mbox series

Message ID 20251031095057.1181439-1-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [RFC,v2] utils: checkstyle.py: Accept `Closes` commit trailer
Related show

Commit Message

Barnabás Pőcze Oct. 31, 2025, 9:50 a.m. UTC
`Closes: <url>` is recognized by gitlab[0] and closes the referenced issue
automatically when a commit is made to the project's default branch. Now
that issues are hosted on gitlab, it will be the preferred way to reference
the fixed issue from a commit, so replace the previously used `Bug` with it
in the checkstlye.py script.

[0]: https://docs.gitlab.com/user/project/issues/managing_issues/#default-closing-pattern

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
changes in v2:
  * remove `Bug`

v1: https://patchwork.libcamera.org/patch/24888/
---
Still one potential question remains: should the url be restricted?
I think it makes sense to allow arbitrary urls to support different
bug trackers (e.g. rpi github).
---
 utils/checkstyle.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.51.1

Patch
diff mbox series

diff --git a/utils/checkstyle.py b/utils/checkstyle.py
index f6229bbd86..fa1355c173 100755
--- a/utils/checkstyle.py
+++ b/utils/checkstyle.py
@@ -541,7 +541,7 @@  class TrailersChecker(CommitChecker):

     known_trailers = {
         'Acked-by': email_regex,
-        'Bug': link_regex,
+        'Closes': link_regex,
         'Co-developed-by': email_regex,
         'Fixes': commit_regex,
         'Link': link_regex,