Support storing whether to authenticate commits by git repository
To allow using the Guix Data Service when commits aren't authenticated.
This commit is contained in:
parent
888d9fcb98
commit
9f9c23010e
6 changed files with 30 additions and 4 deletions
|
|
@ -47,12 +47,15 @@
|
||||||
(define (select-git-repository conn id)
|
(define (select-git-repository conn id)
|
||||||
(match (exec-query
|
(match (exec-query
|
||||||
conn
|
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))
|
(list id))
|
||||||
(()
|
(()
|
||||||
#f)
|
#f)
|
||||||
((result)
|
(((label url cgit_url_base fetch_with_authentication))
|
||||||
result)))
|
(list label
|
||||||
|
url
|
||||||
|
cgit_url_base
|
||||||
|
(string=? fetch_with_authentication "t")))))
|
||||||
|
|
||||||
(define (git-repository-id->url conn id)
|
(define (git-repository-id->url conn id)
|
||||||
(match
|
(match
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
(with-thread-postgresql-connection
|
(with-thread-postgresql-connection
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(select-git-repository conn id))))
|
(select-git-repository conn id))))
|
||||||
((label url cgit-url-base)
|
((label url cgit-url-base fetch-with-authentication?)
|
||||||
(letpar& ((branches
|
(letpar& ((branches
|
||||||
(with-thread-postgresql-connection
|
(with-thread-postgresql-connection
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
-- Deploy guix-data-service:git_repositories_add_fetch_with_authentication_field to pg
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
ALTER TABLE git_repositories
|
||||||
|
ADD COLUMN fetch_with_authentication boolean NOT NULL DEFAULT TRUE;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- Revert guix-data-service:git_repositories_add_fetch_with_authentication_field from pg
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
-- XXX Add DDLs here.
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
|
@ -72,3 +72,4 @@ change_locale_values 2020-09-26T10:20:22Z Christopher Baines <mail@cbaines.net>
|
||||||
change_autovacuum_config 2020-10-01T21:24:46Z Christopher Baines <mail@cbaines.net> # Change autovacuum config
|
change_autovacuum_config 2020-10-01T21:24:46Z Christopher Baines <mail@cbaines.net> # Change autovacuum config
|
||||||
change_derivation_source_file_nars_constraint 2020-10-02T17:12:58Z Christopher Baines <mail@cbaines.net> # Change derivation source file nars constraint
|
change_derivation_source_file_nars_constraint 2020-10-02T17:12:58Z Christopher Baines <mail@cbaines.net> # Change derivation source file nars constraint
|
||||||
add_derivation_sources_derivation_source_file_id_index 2020-10-02T19:11:59Z Christopher Baines <mail@cbaines.net> # Add derivation_sources.derivation_source_file_id index
|
add_derivation_sources_derivation_source_file_id_index 2020-10-02T19:11:59Z Christopher Baines <mail@cbaines.net> # Add derivation_sources.derivation_source_file_id index
|
||||||
|
git_repositories_add_fetch_with_authentication_field 2020-10-07T17:31:20Z Christopher Baines <mail@cbaines.net> # Add git_repositories.fetch_with_authentication
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- Verify guix-data-service:git_repositories_add_fetch_with_authentication_field on pg
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
-- XXX Add verifications here.
|
||||||
|
|
||||||
|
ROLLBACK;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue