summaryrefslogtreecommitdiff
path: root/guix/import/github.scm
AgeCommit message (Collapse)Author
2020-07-24import: github: Gracefully handle projects that have disappeared.Ludovic Courtès
Fixes <https://bugs.gnu.org/42509>. Reported by Alexandru-Sergiu Marton <brown121407@posteo.ro>. * guix/import/github.scm (fetch-releases-or-tags): Use 'http-fetch' instead of 'json-fetch', and guard against 404 errors. Upon 404, emit a warning and return the empty vector.
2020-07-03import: Do not assume that 'package-source' returns an origin.Ludovic Courtès
* guix/gnu-maintenance.scm (gnu-package?): Check whether 'package-source' returns an origin. * guix/import/github.scm (updated-github-url): Likewise. * guix/import/launchpad.scm (updated-launchpad-url): Likewise.
2020-02-22import: github: Use HTTP "Authorization" header for access tokens.Matt Wette
Fixes <https://bugs.gnu.org/39511>. The "access_token" query parameter is now deprecated: https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters * guix/import/github.scm (fetch-releases-or-tags)[headers]: Add "Authorization" header when (%github-token) is true. [decorate]: Remove, and remove callers.
2019-09-20import/github: Check for more version prefixes.Efraim Flashner
* guix/import/github.scm (latest-released-version): Allow the version string to begin with the word 'version'.
2019-09-08import: github: Fix incorrect no-release case.Ludovic Courtès
This is a followup to 81c3dc32244a17241d74eea9fa265edfcb326f6d. Since that commit, when /releases returned an empty JSON array, we would not fall back to /tags because of the incorrect match. * guix/import/github.scm (fetch-releases-or-tags): Match the empty vector instead of the empty list.
2019-08-27import: github: 'github-package?' uses 'package-upstream-name'.Ludovic Courtès
* guix/import/github.scm (updated-github-url): Use 'package-upstream-name' instead of 'package-name'. This allows 'github-package?' to match more packages, given an appropriate upstream name.
2019-07-25maint: Switch to Guile-JSON 3.x.Ludovic Courtès
Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on until now: it maps JSON dictionaries to alists (instead of hash tables), and JSON arrays to vectors (instead of lists). This commit is about adjusting all the existing code to this new mapping. * m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro. * configure.ac: Use it. * doc/guix.texi (Requirements): Mention the Guile-JSON version. * guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3. * guix/import/cpan.scm (string->license): Expect vectors instead of lists. (module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'. (cpan-fetch): Likewise. * guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list' for DEPS. * guix/import/gem.scm (rubygems-fetch): Likewise. * guix/import/json.scm (json-fetch-alist): Remove. * guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (latest-source-release, latest-wheel-release): Call 'vector->list' on RELEASES. * guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (lts-package-version): Use 'vector->list'. * guix/import/utils.scm (hash-table->alist): Remove. (alist->package): Pass 'vector->list' on the inputs fields, and default to the empty vector. * guix/scripts/import/json.scm (guix-import-json): Remove call to 'hash-table->alist'. * guix/swh.scm (define-json-reader): Expect pair? or null? instead of hash-table?. [extract-field]: Use 'assoc-ref' instead of 'hash-ref'. (json->branches): Use 'map' instead of 'hash-map->list'. (json->checksums): Likewise. (json->directory-entries, origin-visits): Call 'vector->list' on the result of 'json->scm'. * tests/import-utils.scm ("alist->package with dependencies"): New test. * gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3. * gnu/installer.scm (installer-program)[installer-builder]: Likewise. * gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref' instead of 'hash-ref', and pass vectors through 'vector->list'. (iso3166->iso3166-territories): Likewise. * gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3. * guix/docker.scm (manifest, config): Adjust for Guile-JSON 3. * guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3. * guix/import/github.scm (fetch-releases-or-tags): Update docstring. (latest-released-version): Use 'assoc-ref' instead of 'hash-ref'. Pass the result of 'fetch-releases-or-tags' to 'vector->list'. * guix/import/launchpad.scm (latest-released-version): Likewise.
2019-05-15import: github: Sort releases before picking the latest one.Arun Isaac
* guix/import/github.scm (latest-released-version): Sort releases before picking the first one as the latest.
2019-05-15import: github: Improve readability.Arun Isaac
* guix/import/github.scm (latest-released-version)[release->version]: Separate out release->version as a new function.
2019-01-21import: github: Improve readability.Arun Isaac
* guix/import/github.scm (latest-released-version): Use any and cond instead of a recursive loop and an if-else ladder respectively.
2019-01-21import: github: Use prereleases when package has no releases.Arun Isaac
* guix/import/github.scm (latest-released-version): Use preleases when package has no releases.
2019-01-21import: github: Check if git URIs are GitHub URIs.Arun Isaac
This fixes a regression introduced in 9a5091d0c181453d0f31ce97f96a4e577a25e796 whereby packages with git origin URIs not hosted on GitHub would be wrongly detected as being covered under the github updater. Reported by Efraim Flashner <efraim@flashner.co.il>. * guix/import/github.scm (updated-github-url): Check if git URIs are GitHub URIs.
2019-01-16import: github: Do not update URI for packages using git-fetch.Arun Isaac
* guix/import/github.scm (updated-github-url): Return the unchanged source URI for packages using git-fetch. [updated-url]: Do not handle URIs which end with ".git".
2018-12-31refresh: github: updates for origins using 'git-fetch'.Eric Bavier
* guix/import/github.scm (updated-github-url): Respond with the repository url for the 'git-fetch' fetch method. (github-package?): Simplify boolean expression. (github-repository, github-user-slash-repository): Strip trailing ".git" from project if present. (latest-release)<origin-github-uri>: Recognize a 'git-reference'.
2018-08-20import: github: Filter out tags that don't look like version numbers.Ludovic Courtès
* guix/import/github.scm (latest-released-version): Filter out RELEASE if it doesn't start with digit.
2018-08-20import: github: Get /tags when /releases returns the empty list.Ludovic Courtès
This allows "guix refresh" to work for many packages where it would previously fail with "no updater for PACKAGE". * guix/import/github.scm (fetch-releases-or-tags): New procedure. (latest-released-version): Use it instead of calling 'json-fetch'. Adjust 'hash-ref' call.
2018-08-20import: github: Request API v3 in the 'Accept' header.Ludovic Courtès
* guix/import/json.scm (json-fetch): Add #:headers argument and honor it. * guix/import/github.scm (latest-released-version): Pass #:headers to 'json-fetch'.
2018-06-10import: json: Consolidate duplicate json-fetch functionality.Jelle Licht
* guix/import/json.scm (json-fetch): Return a list or hash table. (json-fetch-alist): New procedure. * guix/import/github.scm (json-fetch*): Remove. (latest-released-version): Use json-fetch. * guix/import/cpan.scm (module->dist-name): Use json-fetch-alist. (cpan-fetch): Likewise. * guix/import/crate.scm (crate-fetch): Likewise. * guix/import/gem.scm (rubygems-fetch): Likewise. * guix/import/pypi.scm (pypi-fetch): Likewise. * guix/import/stackage.scm (stackage-lts-info-fetch): Likewise.
2017-10-28import: github: Gracefully handle multiple-URL origins.Ludovic Courtès
* guix/import/github.scm (latest-release)[origin-github-uri]: New procedure. Use it.
2017-01-28import: github: Better tolerate unexpected file extensions.Ludovic Courtès
* guix/import/github.scm (find-extension): Add ".tbz". (updated-github-url): When 'find-extension' returns #f, use "" for EXT.
2017-01-19import: github: Catch HTTP 403 error during fetch.Mathieu OTHACEHE
* guix/import/github.scm (json-fetch*): Catch 403 HTTP error that may be raised if a github token has not been set. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-13http-client: Provide 'User-Agent' header by default.Ludovic Courtès
* guix/http-client.scm (http-fetch): Add #:headers parameter and honor it. Rename 'auth-header' to 'headers'. * guix/import/github.scm (json-fetch*): Add comment about required User-Agent.
2017-01-13import: github: Fix regression on the /releases retrieval.Ludovic Courtès
Fixes a regression introduced in 62bd24db39a86f80242f923eb4cc2f18f3b02c67, which introduced a call to 'hash-table->alist'. * guix/import/github.scm (json-fetch*): New procedure. (latest-released-version): Use it.
2016-12-20import: github: Use 'json-fetch'.Ludovic Courtès
* guix/import/github.scm (json-fetch*): Remove. (latest-released-version): Adjust accordingly.
2016-10-10import: github: Add .love extension.Efraim Flashner
* guix/import/github.scm (find-extension): Add '.love' extension to the list of extensions checked.
2016-05-31import: github: Tiny cosmetic change.Ludovic Courtès
* guix/import/github.scm (find-extension): Use a one-argument lambda.
2016-05-31import github: Add to extension list.Efraim Flashner
* guix/import/github.scm (find-extension): Add '.tgz' extension.
2016-04-15upstream: Pass a package object to updaters.Ludovic Courtès
* guix/upstream.scm (package-update-path): Pass PACKAGE to 'latest-release'. * guix/gnu-maintenance.scm (latest-release*) (latest-gnome-release, latest-xorg-release): Adjust accordingly. * guix/import/cran.scm (latest-cran-release): (latest-bioconductor-release): Likewise. * guix/import/elpa.scm (latest-release): Likewise. * guix/import/gem.scm (latest-release): Likewise. * guix/import/github.scm (latest-release): Likewise. * guix/import/hackage.scm (latest-release): Likewise. * guix/import/pypi.scm (latest-release): Likewise.
2016-02-26import: Add github-updater.Ben Woodcroft
* guix/import/github.scm: New file. * guix/scripts/refresh.scm (%updaters): Add %GITHUB-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention it. * Makefile.am (MODULES): Add gnu/import/github.scm.