Message ID | 20220912135545.24795-2-othacehe@gnu.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#57646,v2,1/4] etc: teams: Add scope support. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
diff --git a/etc/teams.scm.in b/etc/teams.scm.in index 22177422c2..34cc547b26 100644 --- a/etc/teams.scm.in +++ b/etc/teams.scm.in @@ -32,6 +32,7 @@ (srfi srfi-9) (srfi srfi-26) (ice-9 format) + (ice-9 regex) (ice-9 match) (guix ui) (git)) @@ -285,9 +286,11 @@ (define (find-team-by-scope files) (hash-fold (lambda (key team acc) (if (any (lambda (file) - (any (lambda (scope) - ;; XXX: Add regex support? - (string-prefix? scope file)) + (any (match-lambda + ((? string? scope) + (string=? scope file)) + ((? regexp? scope) + (regexp-exec scope file))) (team-scope team))) files) (cons team acc)