diff options
author | Christopher Baines <mail@cbaines.net> | 2023-10-27 14:55:35 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-10-27 14:55:35 +0100 |
commit | 57bab27e26627d17f40cd52fceee641d3e1ef825 (patch) | |
tree | 31fec88bfc3053a5c8a5534572fddb32800b4488 /guix-qa-frontpage | |
parent | 4b0b107b7a226909b75b4e2f3735fb1f2bb12bf1 (diff) | |
download | qa-frontpage-57bab27e26627d17f40cd52fceee641d3e1ef825.tar qa-frontpage-57bab27e26627d17f40cd52fceee641d3e1ef825.tar.gz |
Delete the create branch for issue logs
When looking at creating the branch, to ensure the log inserted (if any) is
fresh.
Diffstat (limited to 'guix-qa-frontpage')
-rw-r--r-- | guix-qa-frontpage/database.scm | 22 | ||||
-rw-r--r-- | guix-qa-frontpage/manage-patch-branches.scm | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/guix-qa-frontpage/database.scm b/guix-qa-frontpage/database.scm index 7aab813..af2da53 100644 --- a/guix-qa-frontpage/database.scm +++ b/guix-qa-frontpage/database.scm @@ -48,7 +48,8 @@ select-from-builds-to-cancel-later insert-create-branch-for-issue-log - select-create-branch-for-issue-log)) + select-create-branch-for-issue-log + delete-create-branch-for-issue-log)) (define-record-type <database> (make-database database-file reader-thread-channel writer-thread-channel @@ -617,3 +618,22 @@ WHERE issue = :issue" (sqlite-reset statement) result))))) + +(define (delete-create-branch-for-issue-log database issue) + (database-call-with-transaction + database + (lambda (db) + (let ((statement + (sqlite-prepare + db + " +DELETE FROM create_branch_for_issue_logs +WHERE issue = :issue" + #:cache? #t))) + (sqlite-bind-arguments + statement + #:issue issue) + + (sqlite-step statement) + (sqlite-reset statement)))) + #t) diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm index 693ff65..204e041 100644 --- a/guix-qa-frontpage/manage-patch-branches.scm +++ b/guix-qa-frontpage/manage-patch-branches.scm @@ -301,6 +301,8 @@ (insert-log new-results) #f))))))))) + (delete-create-branch-for-issue-log database issue-number) + (if (not (assoc-ref patchwork-series "received_all")) (simple-format #t |