diff options
| author | Alex Kost <alezost@gmail.com> | 2018-07-21 23:59:27 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2018-07-27 12:14:24 +0300 |
| commit | 11847908bb370f4187bd8411acc6cf29fc199539 (patch) | |
| tree | 1236cf175aa377e61513fb4bf6a2cece72f447ba /build-farm.el | |
| parent | Move and rename some info faces (diff) | |
| download | emacs-build-farm-11847908bb370f4187bd8411acc6cf29fc199539.tar.gz | |
Add 'build-farm-project' command
* build-farm.el (build-farm-get-entries): Add 'id'/'name' search types
for 'project' entry type.
* build-farm-project.el (build-farm-project): New command.
Diffstat (limited to 'build-farm.el')
| -rw-r--r-- | build-farm.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/build-farm.el b/build-farm.el index af6f63c..116d3ee 100644 --- a/build-farm.el +++ b/build-farm.el @@ -39,6 +39,7 @@ ;; - `build-farm-queued-builds' ;; - `build-farm-jobsets' ;; - `build-farm-projects' +;; - `build-farm-project' ;; ;; You can press RET in a list (of builds, etc.) to see more info on the ;; current entry. You can also select several entries in the list (with @@ -152,12 +153,16 @@ See `build-farm-search-url' for the meaning of ROOT-URL, SEARCH-TYPE and ARGS." (unless (eq search-type 'fake) (if (eq entry-type 'project) - (or (build-farm-cache-get root-url 'projects) - (let ((entries (apply #'build-farm-get-entries-1 - root-url entry-type search-type args))) - (build-farm-cache-set root-url 'projects entries) - (build-farm-cache-set root-url 'projects-received t) - entries)) + (if (memq search-type '(id name)) + (bui-entries-by-ids + (build-farm-get-entries root-url 'project 'all) + args) + (or (build-farm-cache-get root-url 'projects) + (let ((entries (apply #'build-farm-get-entries-1 + root-url entry-type search-type args))) + (build-farm-cache-set root-url 'projects entries) + (build-farm-cache-set root-url 'projects-received t) + entries))) (apply #'build-farm-get-entries-1 root-url entry-type search-type args)))) |
