aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-09-19 12:25:03 +0100
committerChristopher Baines <mail@cbaines.net>2023-09-19 12:25:03 +0100
commit459a5675f64d0d0d5742e1aacef207c06af03184 (patch)
tree745ccd025b41090f8ad451942d7838976007696f /scripts
parentd70198ce0fbdadc7af7194ce77b12a3e7aa0a89a (diff)
downloadqa-frontpage-459a5675f64d0d0d5742e1aacef207c06af03184.tar
qa-frontpage-459a5675f64d0d0d5742e1aacef207c06af03184.tar.gz
Add a command to apply patches
Mostly for testing the code.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-qa-frontpage.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/guix-qa-frontpage.in b/scripts/guix-qa-frontpage.in
index 3368860..2e82c7a 100644
--- a/scripts/guix-qa-frontpage.in
+++ b/scripts/guix-qa-frontpage.in
@@ -35,6 +35,7 @@
(guix-qa-frontpage database)
(guix-qa-frontpage issue)
(guix-qa-frontpage branch)
+ (guix-qa-frontpage patchwork)
(guix-qa-frontpage manage-builds)
(guix-qa-frontpage git-repository)
(guix-qa-frontpage manage-patch-branches)
@@ -209,6 +210,36 @@
(or (assq-ref opts 'systems)
%systems-to-submit-builds-for)))))
+ (("create-issue-branch" issue rest ...)
+ (parameterize
+ ((%git-repository-location (string-append (getcwd) "/guix.git")))
+ (let* ((opts (parse-options
+ %submit-build-options
+ %submit-build-default-options
+ rest))
+ (metrics-registry (make-metrics-registry
+ #:namespace
+ "guixqafrontpage"))
+ (database
+ (setup-database (assq-ref opts 'database)
+ metrics-registry))
+ (issue-number
+ (string->number issue))
+ (all-patchwork-series
+ (with-sqlite-cache
+ database
+ 'latest-patchwork-series-by-issue
+ latest-patchwork-series-by-issue
+ #:ttl 600)))
+
+ (create-branch-for-issue
+ database
+ issue-number
+ (number->string
+ (assoc-ref (assq-ref all-patchwork-series
+ issue-number)
+ "id"))))))
+
((args ...)
(let ((opts (parse-options
%options