From d6262dd287e231af1862799cc24f07dadfc7def2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 4 Nov 2021 01:42:43 +0100 Subject: [PATCH] dev(ci): check all module dirs for valid scopes Will become relevant once Doom's modules have been moved to their own repo. --- core/cli/ci.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/cli/ci.el b/core/cli/ci.el index 389cad76c..74da59658 100644 --- a/core/cli/ci.el +++ b/core/cli/ci.el @@ -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) - (format "%s" (substring scope 1)) - (format "*/%s" scope))))) + (seq-find (doom-rpartial + #'doom-glob (if (string-prefix-p ":" scope) + (format "%s" (substring scope 1)) + (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