dev(ci): ignore fixup!/squash!/wip commits
Otherwise the commit linter makes rebasing impossible without --no-verify, or in magit if the git hooks are installed.
This commit is contained in:
parent
9654179fca
commit
dc3eb8a7cf
1 changed files with 24 additions and 23 deletions
|
@ -231,29 +231,30 @@
|
||||||
bang (equal (match-string 2) "!")
|
bang (equal (match-string 2) "!")
|
||||||
scopes (ignore-errors (split-string (match-string 3) ","))
|
scopes (ignore-errors (split-string (match-string 3) ","))
|
||||||
summary (match-string 4)))))
|
summary (match-string 4)))))
|
||||||
(dolist (fn doom-cli-commit-rules)
|
(unless (string-match-p "^\\(?:\\(?:fixup\\|squash\\)!\\|FIXUP\\|WIP\\) " subject)
|
||||||
(pcase (funcall fn
|
(dolist (fn doom-cli-commit-rules)
|
||||||
:bang bang
|
(pcase (funcall fn
|
||||||
:body body
|
:bang bang
|
||||||
:refs refs
|
:body body
|
||||||
:scopes scopes
|
:refs refs
|
||||||
:subject subject
|
:scopes scopes
|
||||||
:summary summary
|
:subject subject
|
||||||
:type type)
|
:summary summary
|
||||||
(`(,type . ,msg)
|
:type type)
|
||||||
(push msg (if (eq type 'error) errors warnings)))))
|
(`(,type . ,msg)
|
||||||
(if (and (null errors) (null warnings))
|
(push msg (if (eq type 'error) errors warnings)))))
|
||||||
(print! (success "%s %s") (substring (car commit) 0 7) subject)
|
(if (and (null errors) (null warnings))
|
||||||
(print! (start "%s %s") (substring (car commit) 0 7) subject))
|
(print! (success "%s %s") (substring (car commit) 0 7) subject)
|
||||||
(print-group!
|
(print! (start "%s %s") (substring (car commit) 0 7) subject))
|
||||||
(when errors
|
(print-group!
|
||||||
(cl-incf errors?)
|
(when errors
|
||||||
(dolist (e (reverse errors))
|
(cl-incf errors?)
|
||||||
(print! (error "%s" e))))
|
(dolist (e (reverse errors))
|
||||||
(when warnings
|
(print! (error "%s" e))))
|
||||||
(cl-incf warnings?)
|
(when warnings
|
||||||
(dolist (e (reverse warnings))
|
(cl-incf warnings?)
|
||||||
(print! (warn "%s" e))))))))
|
(dolist (e (reverse warnings))
|
||||||
|
(print! (warn "%s" e)))))))))
|
||||||
(when (> warnings? 0)
|
(when (> warnings? 0)
|
||||||
(print! (warn "Warnings: %d") warnings?))
|
(print! (warn "Warnings: %d") warnings?))
|
||||||
(when (> errors? 0)
|
(when (> errors? 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue