Warn if process-branch-updated-mbox won't match any emails
This commit is contained in:
parent
671a85f798
commit
381acf312e
1 changed files with 11 additions and 0 deletions
|
|
@ -28,11 +28,22 @@
|
||||||
(squee)
|
(squee)
|
||||||
(email email)
|
(email email)
|
||||||
(guix-data-service database)
|
(guix-data-service database)
|
||||||
|
(guix-data-service model git-repository)
|
||||||
(guix-data-service branch-updated-emails))
|
(guix-data-service branch-updated-emails))
|
||||||
|
|
||||||
(with-postgresql-connection
|
(with-postgresql-connection
|
||||||
"process-branch-updated-mbox"
|
"process-branch-updated-mbox"
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
|
(let ((count
|
||||||
|
(count-git-repositories-with-x-git-repo-header-values conn)))
|
||||||
|
(when (eq? count 0)
|
||||||
|
(display
|
||||||
|
"\nerror: no git_repositories exist with a value for x_git_repo_header
|
||||||
|
error: to match emails to repositories, the git_repositories entry must have
|
||||||
|
a x_git_repo_header value\n"
|
||||||
|
(current-error-port))
|
||||||
|
(exit 1)))
|
||||||
|
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (file)
|
(lambda (file)
|
||||||
(simple-format (current-error-port)
|
(simple-format (current-error-port)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue