summaryrefslogtreecommitdiff
path: root/build-farm-url.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2018-07-14 12:06:29 +0300
committerAlex Kost <alezost@gmail.com>2018-07-16 21:37:19 +0300
commit43684ea5d4b9e67ef4ca2a9583e5ce7af433a255 (patch)
tree3678a406f399dbc32ee9b65a7d81abcd64b36e5b /build-farm-url.el
parentAdd interface for projects ('build-farm-projects' command) (diff)
downloademacs-build-farm-43684ea5d4b9e67ef4ca2a9583e5ce7af433a255.tar.gz
Use "project/jobset" for jobset ID
* build-farm-url.el (build-farm-jobset-url): Adjust to accept a single argument. * build-farm-jobset.el (build-farm-jobset-id): New function. (build-farm-jobset-filter-id): Use it. (build-farm-jobset-info-insert-url): Pass only jobset ID to 'build-farm-jobset-url'.
Diffstat (limited to 'build-farm-url.el')
-rw-r--r--build-farm-url.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/build-farm-url.el b/build-farm-url.el
index 1b47d64..0280d24 100644
--- a/build-farm-url.el
+++ b/build-farm-url.el
@@ -123,9 +123,14 @@ Skip ARG, if VALUE is nil or an empty string."
(build-farm-api-url "queue"
`(("nr" . ,number))))
-(defun build-farm-jobset-url (project jobset)
- "Return URL of a PROJECT's JOBSET."
- (build-farm-url "jobset/" project "/" jobset))
+(defun build-farm-jobset-url (project-or-id &optional jobset)
+ "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)))
(defun build-farm-jobset-api-url (project)
"Return API URL for jobsets by PROJECT."