From f80eed41bbc4c9d78ec6fddc9476a29abdea449d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 17 Sep 2021 09:10:14 +0200 Subject: [PATCH] dev(ci): fix linter complaining about git Ref lines Such as Co-authored-by: and Signed-off-by: lines. --- core/cli/ci.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/core/cli/ci.el b/core/cli/ci.el index b608a326c..91222b832 100644 --- a/core/cli/ci.el +++ b/core/cli/ci.el @@ -162,16 +162,17 @@ (catch 'found (dolist (line refs) (cl-destructuring-bind (type . ref) (split-string line " +") - (setq ref (string-join ref " ")) - (or (string-match "^\\(https?://.+\\|[^/]+/[^/]+\\)?\\(#[0-9]+\\|@[a-z0-9]+\\)" ref) - (string-match "^https?://" ref) - (and (string-match "^[a-z0-9]\\{12\\}$" ref) - (= (car (doom-call-process "git" "show" ref)) - 0)) - (throw 'found - (cons 'error - (format "%S is not a valid issue/PR, URL, or 12-char commit hash" - line)))))))) + (unless (member type '("Co-authored-by:" "Signed-off-by:")) + (setq ref (string-join ref " ")) + (or (string-match "^\\(https?://.+\\|[^/]+/[^/]+\\)?\\(#[0-9]+\\|@[a-z0-9]+\\)" ref) + (string-match "^https?://" ref) + (and (string-match "^[a-z0-9]\\{12\\}$" ref) + (= (car (doom-call-process "git" "show" ref)) + 0)) + (throw 'found + (cons 'error + (format "%S is not a valid issue/PR, URL, or 12-char commit hash" + line))))))))) ;; TODO Check that bump/revert SUBJECT list: 1) valid modules and 2) ;; modules whose files are actually being touched.