dev(ci): fix false positive invalid trailers

This commit is contained in:
Henrik Lissner 2021-10-28 14:25:31 +02:00
parent 481646ca18
commit 2eaa508121

View file

@ -202,7 +202,7 @@ representing the current commit being checked against. See
(lines (lines
;; Scan BODY because invalid trailers won't be in TRAILERS. ;; Scan BODY because invalid trailers won't be in TRAILERS.
(save-match-data (save-match-data
(and (string-match "\n\\(\n[a-zA-Z-]+:? [^ ][^\n]+\\)+\n*\\'" body) (and (string-match "\n\\(\n[a-zA-Z][a-zA-Z-]*:? [^ ][^\n]+\\)+\n+\\'" body)
(split-string (match-string 0 body) "\n" t))))) (split-string (match-string 0 body) "\n" t)))))
(dolist (line lines) (dolist (line lines)
(unless (string-match-p (concat "^" key-re ":? [^ ]") line) (unless (string-match-p (concat "^" key-re ":? [^ ]") line)