aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-10-07 18:50:13 +0100
committerChristopher Baines <mail@cbaines.net>2020-10-07 18:50:13 +0100
commit9f9c23010e79ea2d1dc400fa5d48562b05d9be29 (patch)
treef76aaa3f89d61de3f6977e44863bc54c5866d714 /guix-data-service/model
parent888d9fcb98c6d697120993efe0b3bbd175bf37d7 (diff)
downloaddata-service-9f9c23010e79ea2d1dc400fa5d48562b05d9be29.tar
data-service-9f9c23010e79ea2d1dc400fa5d48562b05d9be29.tar.gz
Support storing whether to authenticate commits by git repository
To allow using the Guix Data Service when commits aren't authenticated.
Diffstat (limited to 'guix-data-service/model')
-rw-r--r--guix-data-service/model/git-repository.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/guix-data-service/model/git-repository.scm b/guix-data-service/model/git-repository.scm
index 8639644..4eeb99d 100644
--- a/guix-data-service/model/git-repository.scm
+++ b/guix-data-service/model/git-repository.scm
@@ -47,12 +47,15 @@
(define (select-git-repository conn id)
(match (exec-query
conn
- "SELECT label, url, cgit_url_base FROM git_repositories WHERE id = $1"
+ "SELECT label, url, cgit_url_base, fetch_with_authentication FROM git_repositories WHERE id = $1"
(list id))
(()
#f)
- ((result)
- result)))
+ (((label url cgit_url_base fetch_with_authentication))
+ (list label
+ url
+ cgit_url_base
+ (string=? fetch_with_authentication "t")))))
(define (git-repository-id->url conn id)
(match