Switch to storing Git repositories in a table

Rather than just storing the URL in the guix_revisions and
load_new_guix_revision_jobs tables. This will help when storing more
information like tags and branches in the future.
This commit is contained in:
Christopher Baines 2019-05-05 13:35:48 +01:00
parent 051962b54d
commit ce4c3c6ed3
12 changed files with 246 additions and 77 deletions

View file

@ -17,6 +17,7 @@
(define-module (guix-data-service branch-updated-emails)
#:use-module (email email)
#:use-module (guix-data-service model git-repository)
#:use-module (guix-data-service jobs load-new-guix-revision)
#:export (enqueue-job-for-email))
@ -36,7 +37,9 @@
(string? x-git-newrev))
(enqueue-load-new-guix-revision-job
conn
(assoc-ref %repository-url-for-repo
x-git-repo)
(git-repository-url->git-repository-id
conn
(assoc-ref %repository-url-for-repo
x-git-repo))
x-git-newrev
(string-append x-git-repo " " x-git-refname " updated")))))