dev(ci): check all module dirs for valid scopes

Will become relevant once Doom's modules have been moved to their own
repo.
This commit is contained in:
Henrik Lissner 2021-11-04 01:42:43 +01:00
parent a5098d1f2a
commit d6262dd287

View file

@ -67,10 +67,11 @@ Accapted value types can be one or more of ref, hash, url, username, or name.")
scope)
(user-error "%s commits should never have a scope" type)))
(fn! (scope _)
(doom-glob doom-modules-dir
(if (string-prefix-p ":" scope)
(seq-find (doom-rpartial
#'doom-glob (if (string-prefix-p ":" scope)
(format "%s" (substring scope 1))
(format "*/%s" scope)))))
(format "*/%s" scope)))
doom-modules-dirs)))
"A list of valid commit scopes as strings or functions.
Functions should take two arguments: a single scope (symbol) and a commit plist