swh: Fix API call for getting origin.

When using the archival linter, git origins already in the archive where
not recognized due to an API change and where repeatedly asked for archival.
This is fixed here.

* guix/swh.scm (lookup-origin): Fix API URI for getting origin.
(<origin>): Fix comment with API URI example.
This commit is contained in:
Björn Höfling 2019-12-15 22:00:56 +01:00
parent ef6856ea72
commit 356a79becc
No known key found for this signature in database
GPG key ID: BF286CB6593E5FFD

View file

@ -244,7 +244,7 @@ (define (name args ...)
docstring docstring
(call (swh-url components ...) json->value))))) (call (swh-url components ...) json->value)))))
;; <https://archive.softwareheritage.org/api/1/origin/git/url/https://github.com/guix-mirror/guix/> ;; <https://archive.softwareheritage.org/api/1/origin//https://github.com/guix-mirror/guix/get>
(define-json-mapping <origin> make-origin origin? (define-json-mapping <origin> make-origin origin?
json->origin json->origin
(id origin-id) (id origin-id)
@ -365,7 +365,7 @@ (define-json-mapping <vault-reply> make-vault-reply vault-reply?
(define-query (lookup-origin url) (define-query (lookup-origin url)
"Return an origin for URL." "Return an origin for URL."
(path "/api/1/origin/git/url" url) (path "/api/1/origin" url "get")
json->origin) json->origin)
(define-query (lookup-content hash type) (define-query (lookup-content hash type)