[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/12: swh: ‘origin-visits’ takes an optional ‘max’ parameter.
From: |
guix-commits |
Subject: |
05/12: swh: ‘origin-visits’ takes an optional ‘max’ parameter. |
Date: |
Sat, 9 Mar 2024 13:49:06 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit ed9d7d84314d4bea1ff610420cf09f79d9d82719
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Feb 20 14:38:23 2024 +0100
swh: ‘origin-visits’ takes an optional ‘max’ parameter.
* guix/swh.scm (origin-visits): Add optional ‘max’ parameter and honor
it.
Change-Id: I642d7d4b0672b68fb5c7ce2b49161307e13d3c95
---
guix/swh.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/guix/swh.scm b/guix/swh.scm
index 83f67423c8..14c65f6806 100644
--- a/guix/swh.scm
+++ b/guix/swh.scm
@@ -474,10 +474,11 @@ and use of ALGORITHM."
hash)
external-id-target))
-(define (origin-visits origin)
- "Return the list of visits of ORIGIN, a record as returned by
-'lookup-origin'."
- (call (swh-url (origin-visits-url origin))
+(define* (origin-visits origin #:optional (max 10))
+ "Return the list of the up to MAX latest visits of ORIGIN, a record as
+returned by 'lookup-origin'."
+ (call (string-append (swh-url (origin-visits-url origin))
+ "?per_page=" (number->string max))
(lambda (port)
(map json->visit (vector->list (json->scm port))))))
- branch master updated (d53ca79370 -> 2f441fc738), guix-commits, 2024/03/09
- 09/12: bzr-download: Implement nar fallback., guix-commits, 2024/03/09
- 12/12: download: Honor ‘GUIX_DOWNLOAD_METHODS’ environment variable., guix-commits, 2024/03/09
- 01/12: lint: Switch to SRFI-71., guix-commits, 2024/03/09
- 04/12: swh: Add ‘type’ field to <visit>., guix-commits, 2024/03/09
- 07/12: hg-download: Use ‘swh-download-directory-by-nar-hash’., guix-commits, 2024/03/09
- 10/12: download-nar: Distinguish ‘output’ and ‘item’ parameter., guix-commits, 2024/03/09
- 06/12: swh: ‘lookup-origin-revision’ handles branches pointing to directories., guix-commits, 2024/03/09
- 02/12: lint: archival: Fix crash in non-Git case., guix-commits, 2024/03/09
- 08/12: svn-download: Use ‘swh-download-directory-by-nar-hash’., guix-commits, 2024/03/09
- 05/12: swh: ‘origin-visits’ takes an optional ‘max’ parameter.,
guix-commits <=
- 03/12: lint: archival: Trigger “Save Code Now” for VCSes other than Git., guix-commits, 2024/03/09
- 11/12: perform-download: Allow use of ‘download-nar’ for ‘--check’ builds., guix-commits, 2024/03/09