summaryrefslogtreecommitdiff
path: root/build-farm-url.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2018-07-16 22:55:13 +0300
committerAlex Kost <alezost@gmail.com>2018-07-27 12:14:24 +0300
commit5fd3f63a40cb0314032ef9bafef8b9afede66a57 (patch)
tree8a7ef3ef7a80ce6c43f5778a27da966c04668acf /build-farm-url.el
parentDistinguish system types supported by Nix and Guix (diff)
downloademacs-build-farm-5fd3f63a40cb0314032ef9bafef8b9afede66a57.tar.gz
Use key arguments for 'build-farm-jobset-url'
This should have been done in commit 43684ea5d4b9e67ef4ca2a9583e5ce7af433a255. * build-farm-url.el (build-farm-jobset-url): Use key arguments. * build-farm-jobset.el (build-farm-jobset-info-insert-url): Adjust accordingly. * build-farm-project.el (build-farm-project-info-insert-jobset): Likewise.
Diffstat (limited to 'build-farm-url.el')
-rw-r--r--build-farm-url.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/build-farm-url.el b/build-farm-url.el
index 0280d24..cc21150 100644
--- a/build-farm-url.el
+++ b/build-farm-url.el
@@ -123,14 +123,13 @@ Skip ARG, if VALUE is nil or an empty string."
(build-farm-api-url "queue"
`(("nr" . ,number))))
-(defun build-farm-jobset-url (project-or-id &optional jobset)
+(cl-defun build-farm-jobset-url (&key project jobset jobset-id)
"Return URL of a PROJECT's JOBSET.
-If a single argument (PROJECT-OR-ID) is specified, it should have
-a form 'project/jobset'."
- (let ((jobset-id (if jobset
- (concat project-or-id "/" jobset)
- project-or-id)))
- (build-farm-url "jobset/" jobset-id)))
+You should specify either a single JOBSET-ID argument (it should have
+a form 'project/jobset') or PROJECT and JOBSET arguments."
+ (build-farm-url "jobset/"
+ (or jobset-id
+ (concat project "/" jobset))))
(defun build-farm-jobset-api-url (project)
"Return API URL for jobsets by PROJECT."