From d0d868f2add068074bd3e2fcf06729979b9d2222 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 26 Apr 2026 19:51:52 +0200 Subject: [PATCH] update ghub --- .../.dir-locals.el | 2 + elpa/ghub-20260423.1634/README-elpa | 21 +++ .../dir | 0 .../ghub-autoloads.el | 4 +- .../ghub-graphql.el | 24 +-- .../ghub-legacy.el | 143 +++++++++--------- .../ghub-pkg.el | 8 +- .../ghub.el | 141 ++++++++--------- .../ghub.info | 35 ++--- .../gsexp.el | 76 +++++----- 10 files changed, 247 insertions(+), 207 deletions(-) rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/.dir-locals.el (73%) create mode 100644 elpa/ghub-20260423.1634/README-elpa rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/dir (100%) rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/ghub-autoloads.el (93%) rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/ghub-graphql.el (94%) rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/ghub-legacy.el (82%) rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/ghub-pkg.el (73%) rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/ghub.el (89%) rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/ghub.info (98%) rename elpa/{ghub-20251130.1842 => ghub-20260423.1634}/gsexp.el (57%) diff --git a/elpa/ghub-20251130.1842/.dir-locals.el b/elpa/ghub-20260423.1634/.dir-locals.el similarity index 73% rename from elpa/ghub-20251130.1842/.dir-locals.el rename to elpa/ghub-20260423.1634/.dir-locals.el index aff6808e..b6f86eae 100644 --- a/elpa/ghub-20251130.1842/.dir-locals.el +++ b/elpa/ghub-20260423.1634/.dir-locals.el @@ -1,5 +1,7 @@ ((nil (indent-tabs-mode . nil)) + (emacs-lisp-mode + (lisp-indent-local-overrides . ((cond . 0) (interactive . 0)))) (makefile-mode (indent-tabs-mode . t)) (git-commit-mode diff --git a/elpa/ghub-20260423.1634/README-elpa b/elpa/ghub-20260423.1634/README-elpa new file mode 100644 index 00000000..a1ac7252 --- /dev/null +++ b/elpa/ghub-20260423.1634/README-elpa @@ -0,0 +1,21 @@ +Ghub provides basic support for using the APIs of various Git forges +from Emacs packages. Originally it only supported the Github REST +API, but now it also supports the Github GraphQL API as well as the +REST APIs of Gitlab, Gitea, Gogs and Bitbucket. + +Ghub abstracts access to API resources using only a handful of basic +functions such as `ghub-get'. These are convenience wrappers around +`ghub-request'. + +When accessing Github, then Ghub handles the creation and storage of +access tokens using a setup wizard to make it easier for users to get +started. The tokens for other forges have to be created manually. + +Ghub is intentionally limited to only provide these two essential +features — basic request functions and guided setup — to avoid being +too opinionated, which would hinder wide adoption. It is assumed that +wide adoption would make life easier for users and maintainers alike, +because then all packages that talk to forge APIs could be configured +the same way. + +Please consult the manual (info "ghub") for more information. diff --git a/elpa/ghub-20251130.1842/dir b/elpa/ghub-20260423.1634/dir similarity index 100% rename from elpa/ghub-20251130.1842/dir rename to elpa/ghub-20260423.1634/dir diff --git a/elpa/ghub-20251130.1842/ghub-autoloads.el b/elpa/ghub-20260423.1634/ghub-autoloads.el similarity index 93% rename from elpa/ghub-20251130.1842/ghub-autoloads.el rename to elpa/ghub-20260423.1634/ghub-autoloads.el index 3e17afff..45d57880 100644 --- a/elpa/ghub-20251130.1842/ghub-autoloads.el +++ b/elpa/ghub-20260423.1634/ghub-autoloads.el @@ -11,8 +11,8 @@ ;;; Generated autoloads from ghub.el -(autoload 'ghub-clear-caches "ghub" "\ -Clear all caches that might negatively affect Ghub. +(autoload 'ghub-clear-caches "ghub" +"Clear all caches that might negatively affect Ghub. If a library that is used by Ghub caches incorrect information such as a mistyped password, then that can prevent Ghub from diff --git a/elpa/ghub-20251130.1842/ghub-graphql.el b/elpa/ghub-20260423.1634/ghub-graphql.el similarity index 94% rename from elpa/ghub-20251130.1842/ghub-graphql.el rename to elpa/ghub-20260423.1634/ghub-graphql.el index adaaa24e..c0e02c0c 100644 --- a/elpa/ghub-20251130.1842/ghub-graphql.el +++ b/elpa/ghub-20260423.1634/ghub-graphql.el @@ -1,6 +1,6 @@ ;;; ghub-graphql.el --- Access Github API using GraphQL -*- lexical-binding:t -*- -;; Copyright (C) 2016-2025 Jonas Bernoulli +;; Copyright (C) 2016-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Homepage: https://github.com/magit/ghub @@ -51,8 +51,8 @@ repositories.") (cl-defun ghub-graphql-rate-limit (&key username auth host) "Return rate limit information." (let-alist (ghub-query - '(query (rateLimit limit cost remaining resetAt)) nil - :synchronous t :username username :auth auth :host host) + '(query (rateLimit limit cost remaining resetAt)) nil + :synchronous t :username username :auth auth :host host) .data.rateLimit)) (cl-defstruct (ghub--graphql-req @@ -120,9 +120,10 @@ repositories.") (with-current-buffer (get-buffer-create " *gsexp-encode*") (erase-buffer) (insert (ghub--graphql-req-query-str req) "\n\n") - (let ((pos (point))) - (insert (ghub--encode-payload (ghub--graphql-req-variables req)) "\n") - (ignore-errors (json-pretty-print pos (point)))))) + (when-let ((payload (ghub--graphql-req-variables req))) + (let ((pos (point))) + (insert (ghub--encode-payload payload) "\n") + (ignore-errors (json-pretty-print pos (point))))))) (ghub--retrieve (ghub--encode-payload `((query . ,(ghub--graphql-req-query-str req)) @@ -183,6 +184,7 @@ repositories.") (set-buffer-multibyte t) (let* ((headers (ghub--handle-response-headers status req)) (payload (ghub--handle-response-payload req)) + (data (assq 'data payload)) (err (plist-get status :error)) (errors (and (not (and (ghub--req-noerror req) (assq 'data payload))) @@ -191,9 +193,11 @@ repositories.") (when (and (not err) ghub-debug) (ignore-errors (json-pretty-print (point) (point-max))) (pop-to-buffer buf)) - (ghub--graphql-handle-failure - req (or err errors) headers status)) - ((ghub--graphql-walk-response req (assq 'data payload)))))) + (if (ghub--req-noerror req) + (ghub--graphql-walk-response req data) + (ghub--graphql-handle-failure + req (or err errors) headers status))) + ((ghub--graphql-walk-response req data))))) (when (and (buffer-live-p buf) (not (buffer-local-value 'ghub-debug buf))) (kill-buffer buf))))) @@ -341,6 +345,7 @@ repositories.") (treepy-zipper branchp #'identity make-node root))) ;;; _ +(provide 'ghub-graphql) ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and-let" . "cond-let--and-let") @@ -348,5 +353,4 @@ repositories.") ;; ("when-let" . "cond-let--when-let") ;; ("while-let" . "cond-let--while-let")) ;; End: -(provide 'ghub-graphql) ;;; ghub-graphql.el ends here diff --git a/elpa/ghub-20251130.1842/ghub-legacy.el b/elpa/ghub-20260423.1634/ghub-legacy.el similarity index 82% rename from elpa/ghub-20251130.1842/ghub-legacy.el rename to elpa/ghub-20260423.1634/ghub-legacy.el index 4c46b3c0..1fa2ff7a 100644 --- a/elpa/ghub-20251130.1842/ghub-legacy.el +++ b/elpa/ghub-20260423.1634/ghub-legacy.el @@ -1,6 +1,6 @@ ;;; ghub-legacy.el --- Deprecated Ghub functions -*- lexical-binding:t -*- -;; Copyright (C) 2016-2025 Jonas Bernoulli +;; Copyright (C) 2016-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Homepage: https://github.com/magit/ghub @@ -34,26 +34,28 @@ &key username auth host forge headers silent callback errorback value extra) + (declare (obsolete ghub-query "Ghub 5.1.0")) (cl-assert (not (stringp variables))) (cl-assert (or (stringp graphql) (memq (car-safe graphql) '(query mutation)))) (unless (stringp graphql) (setq graphql (gsexp-encode (ghub--graphql-prepare-query graphql)))) (ghub-request "POST" - (if (eq forge 'gitlab) "/api/graphql" "/graphql") - nil - :payload `((query . ,graphql) - ,@(and variables `((variables ,@variables)))) - :headers headers :silent silent - :username username :auth auth :host host :forge forge - :callback callback :errorback errorback - :extra extra :value value)) + (if (eq forge 'gitlab) "/api/graphql" "/graphql") + nil + :payload `((query . ,graphql) + ,@(and variables `((variables ,@variables)))) + :headers headers :silent silent + :username username :auth auth :host host :forge forge + :callback callback :errorback errorback + :extra extra :value value)) (cl-defun ghub--graphql (graphql &optional variables &key username auth host forge headers callback errorback) + (declare (obsolete ghub-query "Ghub 5.1.0")) (ghub--graphql-vacuum graphql variables callback nil :username username :auth auth @@ -67,6 +69,7 @@ &optional until &key narrow username auth host forge headers paginate errorback noerror synchronous) + (declare (obsolete ghub-query "Ghub 5.1.0")) (ghub-query query variables :until until :narrow narrow :headers headers :paginate paginate :callback callback @@ -265,21 +268,22 @@ "Asynchronously fetch forge data about the specified repository. Once all data has been collected, CALLBACK is called with the data as the only argument." + (declare (obsolete nil "Ghub 5.1.0")) (ghub-query (if sparse ghub-fetch-repository-sparse ghub-fetch-repository) - `((owner . ,owner) - (name . ,name)) - :until until - :narrow '(repository) - :username username - :auth auth - :host host - :forge forge - :headers headers - :paginate paginate - :callback callback - :errorback errorback)) + `((owner . ,owner) + (name . ,name)) + :until until + :narrow '(repository) + :username username + :auth auth + :host host + :forge forge + :headers headers + :paginate paginate + :callback callback + :errorback errorback)) (cl-defun ghub-fetch-discussion ( owner name number callback &optional until @@ -288,20 +292,21 @@ data as the only argument." "Asynchronously fetch forge data about the specified discussion. Once all data has been collected, CALLBACK is called with the data as the only argument." + (declare (obsolete nil "Ghub 5.1.0")) (ghub-query (ghub--graphql-prepare-query ghub-fetch-repository `(repository discussions (discussion . ,number))) - `((owner . ,owner) - (name . ,name)) - :until until - :narrow '(repository discussion) - :username username - :auth auth - :host host - :forge forge - :headers headers - :callback callback - :errorback errorback)) + `((owner . ,owner) + (name . ,name)) + :until until + :narrow '(repository discussion) + :username username + :auth auth + :host host + :forge forge + :headers headers + :callback callback + :errorback errorback)) (cl-defun ghub-fetch-issue ( owner name number callback &optional until @@ -310,21 +315,22 @@ data as the only argument." "Asynchronously fetch forge data about the specified issue. Once all data has been collected, CALLBACK is called with the data as the only argument." + (declare (obsolete nil "Ghub 5.1.0")) (ghub-query (ghub--graphql-narrow-query ghub-fetch-repository `(repository issues (issue . ,number))) - `((owner . ,owner) - (name . ,name)) - :until until - :narrow '(repository issue) - :username username - :auth auth - :host host - :forge forge - :headers headers - :paginate paginate - :callback callback - :errorback errorback)) + `((owner . ,owner) + (name . ,name)) + :until until + :narrow '(repository issue) + :username username + :auth auth + :host host + :forge forge + :headers headers + :paginate paginate + :callback callback + :errorback errorback)) (cl-defun ghub-fetch-pullreq ( owner name number callback &optional until @@ -336,18 +342,18 @@ data as the only argument." (ghub-query (ghub--graphql-narrow-query ghub-fetch-repository `(repository pullRequests (pullRequest . ,number))) - `((owner . ,owner) - (name . ,name)) - :until until - :narrow '(repository pullRequest) - :username username - :auth auth - :host host - :forge forge - :headers headers - :paginate paginate - :callback callback - :errorback errorback)) + `((owner . ,owner) + (name . ,name)) + :until until + :narrow '(repository pullRequest) + :username username + :auth auth + :host host + :forge forge + :headers headers + :paginate paginate + :callback callback + :errorback errorback)) (cl-defun ghub-fetch-review-threads ( owner name number callback &optional until @@ -356,21 +362,22 @@ data as the only argument." "Asynchronously fetch forge data about the review threads from a pull-request. Once all data has been collected, CALLBACK is called with the data as the only argument." + (declare (obsolete nil "Ghub 5.1.0")) (ghub-query (ghub--graphql-narrow-query ghub-fetch-repository-review-threads `(repository pullRequests (pullRequest . ,number))) - `((owner . ,owner) - (name . ,name)) - :until until - :narrow '(repository pullRequest) - :username username - :auth auth - :host host - :forge forge - :headers headers - :paginate paginate - :callback callback - :errorback errorback)) + `((owner . ,owner) + (name . ,name)) + :until until + :narrow '(repository pullRequest) + :username username + :auth auth + :host host + :forge forge + :headers headers + :paginate paginate + :callback callback + :errorback errorback)) ;;; _ (provide 'ghub-legacy) diff --git a/elpa/ghub-20251130.1842/ghub-pkg.el b/elpa/ghub-20260423.1634/ghub-pkg.el similarity index 73% rename from elpa/ghub-20251130.1842/ghub-pkg.el rename to elpa/ghub-20260423.1634/ghub-pkg.el index 432944d3..3859d79d 100644 --- a/elpa/ghub-20251130.1842/ghub-pkg.el +++ b/elpa/ghub-20260423.1634/ghub-pkg.el @@ -1,14 +1,14 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "ghub" "20251130.1842" +(define-package "ghub" "20260423.1634" "Client libraries for Git forge APIs." '((emacs "29.1") (compat "30.1") (cond-let "0.2") (llama "1.0") - (treepy "0.1.2")) + (treepy "0.1.3")) :url "https://github.com/magit/ghub" - :commit "9f416605d560ed2a6b62a87d1f624549901b1102" - :revdesc "9f416605d560" + :commit "2b6df7c3f958e64c47151d7d6ef45de38e614936" + :revdesc "2b6df7c3f958" :keywords '("tools") :authors '(("Jonas Bernoulli" . "emacs.ghub@jonas.bernoulli.dev")) :maintainers '(("Jonas Bernoulli" . "emacs.ghub@jonas.bernoulli.dev"))) diff --git a/elpa/ghub-20251130.1842/ghub.el b/elpa/ghub-20260423.1634/ghub.el similarity index 89% rename from elpa/ghub-20251130.1842/ghub.el rename to elpa/ghub-20260423.1634/ghub.el index 317fe329..a455c39a 100644 --- a/elpa/ghub-20251130.1842/ghub.el +++ b/elpa/ghub-20260423.1634/ghub.el @@ -1,19 +1,19 @@ ;;; ghub.el --- Client libraries for Git forge APIs -*- lexical-binding:t -*- -;; Copyright (C) 2016-2025 Jonas Bernoulli +;; Copyright (C) 2016-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Homepage: https://github.com/magit/ghub ;; Keywords: tools -;; Package-Version: 20251130.1842 -;; Package-Revision: 9f416605d560 +;; Package-Version: 20260423.1634 +;; Package-Revision: 2b6df7c3f958 ;; Package-Requires: ( ;; (emacs "29.1") ;; (compat "30.1") ;; (cond-let "0.2") ;; (llama "1.0") -;; (treepy "0.1.2")) +;; (treepy "0.1.3")) ;; SPDX-License-Identifier: GPL-3.0-or-later @@ -78,10 +78,9 @@ (defvar ghub-default-host-alist '((github . "api.github.com") - (gitlab . "gitlab.com/api/v4") - (gitea . "localhost:3000/api/v1") - (gogs . "localhost:3000/api/v1") - (bitbucket . "api.bitbucket.org/2.0")) + (gitlab . "gitlab.com") + (forgejo . "codeberg.org") + (bitbucket . "api.bitbucket.org")) "Alist of default hosts used when the respective `FORGE.host' is not set.") (defvar ghub-github-token-scopes '(repo) @@ -140,11 +139,11 @@ response headers in this variable.") "Make a `HEAD' request for RESOURCE, with optional query PARAMS. Like calling `ghub-request' (which see) with \"HEAD\" as METHOD." (ghub-request "HEAD" resource params - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :username username :auth auth :host host - :callback callback :errorback errorback :extra extra)) + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :username username :auth auth :host host + :callback callback :errorback errorback :extra extra)) (cl-defun ghub-get (resource &optional params @@ -155,11 +154,11 @@ Like calling `ghub-request' (which see) with \"HEAD\" as METHOD." "Make a `GET' request for RESOURCE, with optional query PARAMS. Like calling `ghub-request' (which see) with \"GET\" as METHOD." (ghub-request "GET" resource params - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :username username :auth auth :host host :forge forge - :callback callback :errorback errorback :extra extra)) + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :username username :auth auth :host host :forge forge + :callback callback :errorback errorback :extra extra)) (cl-defun ghub-put (resource &optional params @@ -170,11 +169,11 @@ Like calling `ghub-request' (which see) with \"GET\" as METHOD." "Make a `PUT' request for RESOURCE, with optional payload PARAMS. Like calling `ghub-request' (which see) with \"PUT\" as METHOD." (ghub-request "PUT" resource params - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :username username :auth auth :host host :forge forge - :callback callback :errorback errorback :extra extra)) + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :username username :auth auth :host host :forge forge + :callback callback :errorback errorback :extra extra)) (cl-defun ghub-post (resource &optional params @@ -185,11 +184,11 @@ Like calling `ghub-request' (which see) with \"PUT\" as METHOD." "Make a `POST' request for RESOURCE, with optional payload PARAMS. Like calling `ghub-request' (which see) with \"POST\" as METHOD." (ghub-request "POST" resource params - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :username username :auth auth :host host :forge forge - :callback callback :errorback errorback :extra extra)) + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :username username :auth auth :host host :forge forge + :callback callback :errorback errorback :extra extra)) (cl-defun ghub-patch (resource &optional params @@ -200,11 +199,11 @@ Like calling `ghub-request' (which see) with \"POST\" as METHOD." "Make a `PATCH' request for RESOURCE, with optional payload PARAMS. Like calling `ghub-request' (which see) with \"PATCH\" as METHOD." (ghub-request "PATCH" resource params - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :username username :auth auth :host host :forge forge - :callback callback :errorback errorback :extra extra)) + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :username username :auth auth :host host :forge forge + :callback callback :errorback errorback :extra extra)) (cl-defun ghub-delete (resource &optional params @@ -215,11 +214,11 @@ Like calling `ghub-request' (which see) with \"PATCH\" as METHOD." "Make a `DELETE' request for RESOURCE, with optional payload PARAMS. Like calling `ghub-request' (which see) with \"DELETE\" as METHOD." (ghub-request "DELETE" resource params - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :username username :auth auth :host host :forge forge - :callback callback :errorback errorback :extra extra)) + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :username username :auth auth :host host :forge forge + :callback callback :errorback errorback :extra extra)) (cl-defun ghub-request ( method resource &optional params @@ -392,11 +391,11 @@ See `ghub-request' for information about the other arguments." (with-local-quit (let ((total 0)) (while (not (ghub-request "GET" resource nil - :noerror t - :username username - :auth auth - :host host - :forge forge)) + :noerror t + :username username + :auth auth + :host host + :forge forge)) (message "Waited (%3ss of %ss) for %s..." total duration resource) (if (= total duration) (error "%s is taking too long to create %s" @@ -443,14 +442,15 @@ this function is called with nil for PAYLOAD." Signal an error if the id cannot be determined." (or (pcase forge ((or 'nil 'github) - (let-alist (ghub-graphql - '(query (repository [(owner $owner String!) - (name $name String!)] - id)) - `((owner . ,owner) - (name . ,name)) - :username username :auth auth :host host) - .data.repository.id)) + (let-alist (ghub-query + '(query (repository [(owner $owner String!) + (name $name String!)] + id)) + `((owner . ,owner) + (name . ,name)) + :synchronous t + :username username :auth auth :host host) + .repository.id)) ('gitlab (number-to-string (alist-get @@ -526,15 +526,20 @@ Signal an error if the id cannot be determined." (err (plist-get status :error))) (cond ((and err errorback) (setf (ghub--req-url req) prev) - (funcall (if (eq errorback t) - 'ghub--errorback - errorback) - err headers status req)) + (when (eq errorback t) + (setq errorback #'ghub--errorback)) + (condition-case nil + (funcall errorback err headers status req) + (wrong-number-of-arguments + (funcall errorback err)))) (callback (save-current-buffer (when (buffer-live-p req-buf) (set-buffer req-buf)) - (funcall callback value headers status req))) + (condition-case nil + (funcall callback value headers status req) + (wrong-number-of-arguments + (funcall callback value))))) (t value)))))) (when (and (buffer-live-p buf) (not (buffer-local-value 'ghub-debug buf))) @@ -645,14 +650,14 @@ Signal an error if the id cannot be determined." (concat (if (member host ghub-insecure-hosts) "http://" "https://") ;; Needed for some Github Enterprise instances. (cond - ((and (equal resource "/graphql") - (string-suffix-p "/v3" host)) - (substring host 0 -3)) - ;; Needed for all Gitlab instances. - ((and (equal resource "/api/graphql") - (string-suffix-p "/api/v4" host)) - (substring host 0 -7)) - (host)) + ((and (equal resource "/graphql") + (string-suffix-p "/v3" host)) + (substring host 0 -3)) + ;; Needed for all Gitlab instances. + ((and (equal resource "/api/graphql") + (string-suffix-p "/api/v4" host)) + (substring host 0 -7)) + (host)) resource (and query (concat "?" (ghub--url-encode-params query)))))) @@ -770,12 +775,13 @@ or (info \"(ghub)Getting Started\") for instructions." (or (ghub--git-get (format "%s.host" forge)) (alist-get forge ghub-default-host-alist)))) -(cl-defmethod ghub--username (host &optional forge) +(cl-defmethod ghub--username (host &optional forge compat) (let* ((forge (or forge 'github)) (host (or host (ghub--host forge))) (var (format "%s.%s.user" forge host)) (default-var (format "%s.user" forge))) (cond ((ghub--git-get var)) + ((and compat (ghub--git-get (format "%s.%s.user" forge compat)))) ((not (equal host (alist-get forge ghub-default-host-alist))) (user-error "Cannot determine username; `%s' is unset" var)) ((ghub--git-get default-var)) @@ -813,6 +819,8 @@ or (info \"(ghub)Getting Started\") for instructions." "config" "--get" var)))) ;;; _ +(provide 'ghub) +(require 'ghub-graphql) ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and-let" . "cond-let--and-let") @@ -820,7 +828,4 @@ or (info \"(ghub)Getting Started\") for instructions." ;; ("when-let" . "cond-let--when-let") ;; ("while-let" . "cond-let--while-let")) ;; End: -(provide 'ghub) -(require 'ghub-graphql) -(require 'ghub-legacy) ;;; ghub.el ends here diff --git a/elpa/ghub-20251130.1842/ghub.info b/elpa/ghub-20260423.1634/ghub.info similarity index 98% rename from elpa/ghub-20251130.1842/ghub.info rename to elpa/ghub-20260423.1634/ghub.info index 8cfce139..94506c6b 100644 --- a/elpa/ghub-20251130.1842/ghub.info +++ b/elpa/ghub-20260423.1634/ghub.info @@ -1,6 +1,6 @@ This is ghub.info, produced by makeinfo version 6.8 from ghub.texi. - Copyright (C) 2017-2025 Jonas Bernoulli + Copyright (C) 2017-2026 Jonas Bernoulli You can redistribute this document and/or modify it under the terms @@ -27,9 +27,9 @@ Ghub User and Developer Manual Ghub is an Emacs library that is used by various packages to access the APIs of various instances of various Git forge implementations. -This manual is for Ghub version 5.0.2. +This manual is for Ghub version 5.1.0. - Copyright (C) 2017-2025 Jonas Bernoulli + Copyright (C) 2017-2026 Jonas Bernoulli You can redistribute this document and/or modify it under the terms @@ -309,7 +309,8 @@ token can be used. Before you create a token to be used for a certain package, you should consult the documentation of that package, which in turn should tell you which scopes are needed and why. The Forge package for example -does so in *note (forge)Token Creation::. +does so in *note (forge)Setup for Githubcom:: and *note (forge)Setup for +Gitlabcom::. 2.3.2 Storing a Token --------------------- @@ -965,19 +966,19 @@ Ref: Setting your Github Enterprise Username8953 Ref: Setting your Username for Other Hosts and/or Forges9686 Node: Creating and Storing a Token10492 Ref: Creating a Token10705 -Ref: Storing a Token11622 -Node: Github Configuration Variables13365 -Node: API15076 -Node: Their APIs15278 -Node: Making REST Requests15960 -Node: Making GraphQL Requests25270 -Node: Github Convenience Wrappers31959 -Node: Notes35623 -Node: Using Ghub in Personal Scripts35830 -Node: Using Ghub in Your Own Package36721 -Node: Forge Limitations and Notes37656 -Node: Function Index38668 -Node: Variable Index40936 +Ref: Storing a Token11666 +Node: Github Configuration Variables13409 +Node: API15120 +Node: Their APIs15322 +Node: Making REST Requests16004 +Node: Making GraphQL Requests25314 +Node: Github Convenience Wrappers32003 +Node: Notes35667 +Node: Using Ghub in Personal Scripts35874 +Node: Using Ghub in Your Own Package36765 +Node: Forge Limitations and Notes37700 +Node: Function Index38712 +Node: Variable Index40980  End Tag Table diff --git a/elpa/ghub-20251130.1842/gsexp.el b/elpa/ghub-20260423.1634/gsexp.el similarity index 57% rename from elpa/ghub-20251130.1842/gsexp.el rename to elpa/ghub-20260423.1634/gsexp.el index a1fac790..e869dafb 100644 --- a/elpa/ghub-20251130.1842/gsexp.el +++ b/elpa/ghub-20260423.1634/gsexp.el @@ -1,6 +1,6 @@ ;;; gsexp.el --- GraphQl as S-expressions -*- lexical-binding:t -*- -;; Copyright (C) 2016-2025 Jonas Bernoulli +;; Copyright (C) 2016-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Homepage: https://github.com/magit/ghub @@ -39,49 +39,49 @@ (defun gsexp--encode-field (field) (cond - ((stringp field) - field) - ((symbolp field) - (symbol-name field)) - ((listp (car field)) - (concat (format "%s: " (caar field)) - (gsexp--encode-field (cons (car (cdar field)) - (cdr field))))) - ((concat - (pcase (pop field) - (`[] "") - ((and (pred symbolp) op) (symbol-name op)) - (`[,op] (symbol-name op)) - (`[,op ,name] (format "%s %s" op name))) - (and (vectorp (car field)) - (format " (%s%s)" - (if gsexp-one-variable-per-line "\n" "") - (mapconcat #'gsexp--encode-argument - (append (pop field) nil) - (if gsexp-one-variable-per-line ",\n" ",")))) - (and field - (format " {\n%s\n}" - (mapconcat #'gsexp--encode-field field "\n"))))))) + ((stringp field) + field) + ((symbolp field) + (symbol-name field)) + ((listp (car field)) + (concat (format "%s: " (caar field)) + (gsexp--encode-field (cons (car (cdar field)) + (cdr field))))) + ((concat + (pcase (pop field) + (`[] "") + ((and (pred symbolp) op) (symbol-name op)) + (`[,op] (symbol-name op)) + (`[,op ,name] (format "%s %s" op name))) + (and (vectorp (car field)) + (format " (%s%s)" + (if gsexp-one-variable-per-line "\n" "") + (mapconcat #'gsexp--encode-argument + (append (pop field) nil) + (if gsexp-one-variable-per-line ",\n" ",")))) + (and field + (format " {\n%s\n}" + (mapconcat #'gsexp--encode-field field "\n"))))))) (cl-defun gsexp--encode-argument ((argument value)) (format "%s: %s" argument (gsexp--encode-value value))) (defun gsexp--encode-value (value) (cond - ((numberp value) - (number-to-string value)) - ((symbolp value) ; including variables, enums, booleans and null - (symbol-name value)) - ((stringp value) - (prin1-to-string value)) - ((vectorp value) - (format "(%s)" (mapconcat #'gsexp--encode-value value ""))) - ((listp value) - (format "{%s}" (mapconcat - (pcase-lambda (`(,name ,value)) - (format "%s: %s" name (gsexp--encode-value value))) - value ", "))) - ((error "Invalid field value: %S" value)))) + ((numberp value) + (number-to-string value)) + ((symbolp value) ; including variables, enums, booleans and null + (symbol-name value)) + ((stringp value) + (prin1-to-string value)) + ((vectorp value) + (format "(%s)" (mapconcat #'gsexp--encode-value value ""))) + ((listp value) + (format "{%s}" (mapconcat + (pcase-lambda (`(,name ,value)) + (format "%s: %s" name (gsexp--encode-value value))) + value ", "))) + ((error "Invalid field value: %S" value)))) (defun gsexp--pp (string) (with-temp-buffer -- 2.47.3