aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
authorArun Isaac2022-02-24 17:19:56 +0530
committerArun Isaac2022-02-28 17:41:08 +0530
commite78abc9e04bebe470f1baaccbfe88f9399b091c8 (patch)
tree5e316ec3c6a9dcdeee8e3686e147f246bbf49ec3 /forge
parent3f0a2f3bb853f9c5d07b85b1c845b0c294b9c69c (diff)
downloadguix-forge-e78abc9e04bebe470f1baaccbfe88f9399b091c8.tar.gz
guix-forge-e78abc9e04bebe470f1baaccbfe88f9399b091c8.tar.lz
guix-forge-e78abc9e04bebe470f1baaccbfe88f9399b091c8.zip
forge: Add this-record accessors.
These this-record accessors will be required in thunked fields. * forge/forge.scm (<forge-project-configuration>): Add this-forge-project-configuration accessor and export it. Use it instead of this-record in the default value of the ci-jobs-trigger field. * forge/laminar.scm (<forge-laminar-job>): Add this-forge-laminar-job accessor and export it.
Diffstat (limited to 'forge')
-rw-r--r--forge/forge.scm5
-rw-r--r--forge/laminar.scm2
2 files changed, 6 insertions, 1 deletions
diff --git a/forge/forge.scm b/forge/forge.scm
index fdb4377..ec64aa9 100644
--- a/forge/forge.scm
+++ b/forge/forge.scm
@@ -41,6 +41,7 @@
forge-configuration-guix-daemon-uri
forge-configuration-projects
forge-project-configuration
+ this-forge-project-configuration
forge-project-configuration-user
forge-project-configuration-repository
forge-project-configuration-repository-branch
@@ -55,6 +56,7 @@
(define-record-type* <forge-project-configuration>
forge-project-configuration make-forge-project-configuration
forge-project-configuration?
+ this-forge-project-configuration
(name forge-project-configuration-name)
;; The user field is optional because the repository may be remote
;; and not need to be owned by any user.
@@ -72,7 +74,8 @@
(ci-jobs-trigger forge-project-configuration-ci-jobs-trigger ; one of 'post-receive-hook, 'cron, 'webhook
(default (cond
;; 'post-receive-hook for local repositories
- ((string-prefix? "/" (forge-project-configuration-repository this-record))
+ ((string-prefix? "/" (forge-project-configuration-repository
+ this-forge-project-configuration))
'post-receive-hook)
;; 'cron for remote repositories
(else 'cron)))
diff --git a/forge/laminar.scm b/forge/laminar.scm
index 76e9696..262bbd1 100644
--- a/forge/laminar.scm
+++ b/forge/laminar.scm
@@ -28,6 +28,7 @@
forge-laminar-configuration-jobs
forge-laminar-job
forge-laminar-job?
+ this-forge-laminar-job
forge-laminar-job-name
forge-laminar-job-run
forge-laminar-job-after
@@ -49,6 +50,7 @@
(define-record-type* <forge-laminar-job>
forge-laminar-job make-forge-laminar-job
forge-laminar-job?
+ this-forge-laminar-job
(name forge-laminar-job-name)
(run forge-laminar-job-run)
(after forge-laminar-job-after