From 2622467a0931a1c1c350bbdc4918c76d1ef9246a Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 26 Apr 2026 19:50:57 +0200 Subject: [PATCH] update forge --- .../.dir-locals.el | 2 + elpa/forge-20260423.1757/README-elpa | 7 + .../dir | 0 .../forge-autoloads.el | 136 +++--- .../forge-bitbucket.el | 2 +- .../forge-client.el | 43 +- .../forge-commands.el | 393 ++++++++---------- .../forge-core.el | 139 ++++--- .../forge-db.el | 7 +- .../forge-discussion.el | 6 +- .../forge-forgejo.el | 2 +- .../forge-gitea.el | 3 +- .../forge-github.el | 21 +- .../forge-gitlab.el | 322 +++++++------- .../forge-gogs.el | 2 +- .../forge-issue.el | 6 +- .../forge-notify.el | 49 +-- .../forge-pkg.el | 16 +- .../forge-post.el | 5 +- .../forge-pullreq.el | 6 +- .../forge-repo.el | 13 +- .../forge-repos.el | 3 +- .../forge-revnote.el | 3 +- .../forge-semi.el | 2 +- .../forge-tablist.el | 15 +- .../forge-topic.el | 188 +++++---- .../forge-topics.el | 43 +- .../forge.el | 18 +- .../forge.info | 84 ++-- 29 files changed, 791 insertions(+), 745 deletions(-) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/.dir-locals.el (78%) create mode 100644 elpa/forge-20260423.1757/README-elpa rename elpa/{forge-20251201.1658 => forge-20260423.1757}/dir (100%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-autoloads.el (73%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-bitbucket.el (97%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-client.el (83%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-commands.el (84%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-core.el (85%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-db.el (99%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-discussion.el (98%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-forgejo.el (97%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-gitea.el (96%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-github.el (99%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-gitlab.el (74%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-gogs.el (97%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-issue.el (98%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-notify.el (90%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-pkg.el (66%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-post.el (99%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-pullreq.el (98%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-repo.el (98%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-repos.el (98%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-revnote.el (95%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-semi.el (99%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-tablist.el (85%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-topic.el (93%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge-topics.el (96%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge.el (95%) rename elpa/{forge-20251201.1658 => forge-20260423.1757}/forge.info (98%) diff --git a/elpa/forge-20251201.1658/.dir-locals.el b/elpa/forge-20260423.1757/.dir-locals.el similarity index 78% rename from elpa/forge-20251201.1658/.dir-locals.el rename to elpa/forge-20260423.1757/.dir-locals.el index 5925554f..9de96ab3 100644 --- a/elpa/forge-20251201.1658/.dir-locals.el +++ b/elpa/forge-20260423.1757/.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/forge-20260423.1757/README-elpa b/elpa/forge-20260423.1757/README-elpa new file mode 100644 index 00000000..21c52ec7 --- /dev/null +++ b/elpa/forge-20260423.1757/README-elpa @@ -0,0 +1,7 @@ +Work with Git forges, such as Github and Gitlab, from the comfort +of Magit and the rest of Emacs. + +The schema of the database has not been finalized yet. Until that +has happened it will occasionally have to be discarded. For now +the database does not contain any information that cannot simply +be fetched again. diff --git a/elpa/forge-20251201.1658/dir b/elpa/forge-20260423.1757/dir similarity index 100% rename from elpa/forge-20251201.1658/dir rename to elpa/forge-20260423.1757/dir diff --git a/elpa/forge-20251201.1658/forge-autoloads.el b/elpa/forge-20260423.1757/forge-autoloads.el similarity index 73% rename from elpa/forge-20251201.1658/forge-autoloads.el rename to elpa/forge-20260423.1757/forge-autoloads.el index 54532a48..531ebf33 100644 --- a/elpa/forge-20251201.1658/forge-autoloads.el +++ b/elpa/forge-20260423.1757/forge-autoloads.el @@ -11,8 +11,8 @@ ;;; Generated autoloads from forge.el -(defvar forge-add-default-bindings t "\ -Whether to add Forge's bindings to various Magit keymaps. +(defvar forge-add-default-bindings t +"Whether to add Forge's bindings to various Magit keymaps. If you want to disable this, then you must set this to nil before `magit' is loaded. If you do it before `forge' but after `magit' @@ -41,54 +41,54 @@ is loaded, then `magit-mode-map' ends up being modified anyway.") (autoload 'forge-pull-notifications "forge-commands" nil t) (autoload 'forge-pull-topic "forge-commands" nil t) (autoload 'forge-pull-this-topic "forge-commands" nil t) -(autoload 'forge-browse-discussions "forge-commands" "\ -Visit the current repository's discussions using a browser." t) -(autoload 'forge-browse-issues "forge-commands" "\ -Visit the current repository's issues using a browser." t) -(autoload 'forge-browse-pullreqs "forge-commands" "\ -Visit the current repository's pull-requests using a browser." t) -(autoload 'forge-browse-topic "forge-commands" "\ -Read a TOPIC and visit it using a browser. +(autoload 'forge-browse-discussions "forge-commands" +"Visit the current repository's discussions using a browser." t) +(autoload 'forge-browse-issues "forge-commands" +"Visit the current repository's issues using a browser." t) +(autoload 'forge-browse-pullreqs "forge-commands" +"Visit the current repository's pull-requests using a browser." t) +(autoload 'forge-browse-topic "forge-commands" +"Read a TOPIC and visit it using a browser. By default only offer open topics but with a prefix argument also offer closed topics. (fn TOPIC)" t) -(autoload 'forge-browse-discussion "forge-commands" "\ -Read a DISCUSSION and visit it using a browser. +(autoload 'forge-browse-discussion "forge-commands" +"Read a DISCUSSION and visit it using a browser. By default only offer open discussions but with a prefix argument also offer closed issues. (fn DISCUSSION)" t) -(autoload 'forge-browse-issue "forge-commands" "\ -Read an ISSUE and visit it using a browser. +(autoload 'forge-browse-issue "forge-commands" +"Read an ISSUE and visit it using a browser. By default only offer open issues but with a prefix argument also offer closed issues. (fn ISSUE)" t) -(autoload 'forge-browse-pullreq "forge-commands" "\ -Read a PULL-REQUEST and visit it using a browser. +(autoload 'forge-browse-pullreq "forge-commands" +"Read a PULL-REQUEST and visit it using a browser. By default only offer open pull-requests but with a prefix argument also offer closed pull-requests. (fn PULL-REQUEST)" t) -(autoload 'forge-browse-commit "forge-commands" "\ -Read a COMMIT and visit it using a browser. +(autoload 'forge-browse-commit "forge-commands" +"Read a COMMIT and visit it using a browser. (fn COMMIT)" t) -(autoload 'forge-browse-branch "forge-commands" "\ -Read a BRANCH and visit it using a browser. +(autoload 'forge-browse-branch "forge-commands" +"Read a BRANCH and visit it using a browser. (fn BRANCH)" t) -(autoload 'forge-browse-remote "forge-commands" "\ -Read a REMOTE and visit it using a browser. +(autoload 'forge-browse-remote "forge-commands" +"Read a REMOTE and visit it using a browser. (fn REMOTE)" t) -(autoload 'forge-browse-repository "forge-commands" "\ -Read a REPOSITORY and visit it using a browser. +(autoload 'forge-browse-repository "forge-commands" +"Read a REPOSITORY and visit it using a browser. (fn REPOSITORY)" t) -(autoload 'forge-browse-blob "forge-commands" "\ -Visit a blob using a browser. +(autoload 'forge-browse-blob "forge-commands" +"Visit a blob using a browser. When invoked from a blob- or file-visiting buffer, visit that blob without prompting. If the region is active, try to jump to the marked @@ -108,72 +108,72 @@ commit, and for a file. (fn COMMIT FILE &optional LINE END FORCE-HASH)" t) (autoload 'forge-browse-this-topic "forge-commands" nil t) -(autoload 'forge-browse-this-repository "forge-commands" "\ -Visit the repository at point using a browser." t) -(autoload 'forge-copy-url-at-point-as-kill "forge-commands" "\ -Copy the url of thing at point or the thing visited in the current buffer." t) -(autoload 'forge-browse "forge-commands" "\ -Visit the thing at point using a browser." t) -(autoload 'forge-visit-topic "forge-commands" "\ -Read a TOPIC and visit it. +(autoload 'forge-browse-this-repository "forge-commands" +"Visit the repository at point using a browser." t) +(autoload 'forge-copy-url-at-point-as-kill "forge-commands" +"Copy the url of thing at point or the thing visited in the current buffer." t) +(autoload 'forge-browse "forge-commands" +"Visit the thing at point using a browser." t) +(autoload 'forge-visit-topic "forge-commands" +"Read a TOPIC and visit it. By default only offer active topics for completion. With a prefix argument offer all topics. While completion is in progress, \\\\[forge-read-topic-lift-limit] lifts the limitation to active topics. (fn TOPIC)" t) -(autoload 'forge-visit-discussion "forge-commands" "\ -Read a DISCUSSION and visit it. +(autoload 'forge-visit-discussion "forge-commands" +"Read a DISCUSSION and visit it. By default only offer active topics for completion. With a prefix argument offer all topics. While completion is in progress, \\\\[forge-read-topic-lift-limit] lifts the limitation to active topics. (fn DISCUSSION)" t) -(autoload 'forge-visit-issue "forge-commands" "\ -Read an ISSUE and visit it. +(autoload 'forge-visit-issue "forge-commands" +"Read an ISSUE and visit it. By default only offer active issues for completion. With a prefix argument offer all topics. While completion is in progress, \\\\[forge-read-topic-lift-limit] lifts the limitation to active issues. (fn ISSUE)" t) -(autoload 'forge-visit-pullreq "forge-commands" "\ -Read a PULL-REQUEST and visit it. +(autoload 'forge-visit-pullreq "forge-commands" +"Read a PULL-REQUEST and visit it. By default only offer active pull-requests for completion. With a prefix argument offer all topics. While completion is in progress, \\\\[forge-read-topic-lift-limit] lifts the limitation to active pull-requests. (fn PULL-REQUEST)" t) -(autoload 'forge-visit-topic-from-url "forge-commands" "\ -Visit the topic specified by web URL. +(autoload 'forge-visit-topic-from-url "forge-commands" +"Visit the topic specified by web URL. (fn URL)" t) -(autoload 'forge-visit-this-topic "forge-commands" "\ -Visit the topic at point. +(autoload 'forge-visit-this-topic "forge-commands" +"Visit the topic at point. With prefix argument MENU, also show the topic menu. (fn &optional MENU)" t) -(autoload 'forge-visit-this-repository "forge-commands" "\ -Visit the repository at point." t) -(autoload 'forge-branch-pullreq "forge-commands" "\ -Create and configure a new branch from a pull-request. +(autoload 'forge-visit-this-repository "forge-commands" +"Visit the repository at point." t) +(autoload 'forge-branch-pullreq "forge-commands" +"Create and configure a new branch from a pull-request. Please see the manual for more information. (fn PULLREQ)" t) -(autoload 'forge-checkout-pullreq "forge-commands" "\ -Create, configure and checkout a new branch from a pull-request. +(autoload 'forge-checkout-pullreq "forge-commands" +"Create, configure and checkout a new branch from a pull-request. Please see the manual for more information. (fn PULLREQ)" t) (autoload 'forge-checkout-this-pullreq "forge-commands" nil t) -(autoload 'forge-checkout-worktree "forge-commands" "\ -Create, configure and checkout a new worktree from a pull-request. +(autoload 'forge-checkout-worktree "forge-commands" +"Create, configure and checkout a new worktree from a pull-request. This is like `forge-checkout-pullreq', except that it also creates a new worktree. Please see the manual for more information. (fn PATH PULLREQ)" t) (autoload 'forge-push-to-unnamed-pullreq "forge-commands" nil t) -(autoload 'forge-fork "forge-commands" "\ -Fork the current repository to FORK and add it as a REMOTE. +(autoload 'forge-fork "forge-commands" +"Fork the current repository to FORK and add it as a REMOTE. If the fork already exists, then that isn't an error; the remote is added anyway. Currently this only supports Github and Gitlab. @@ -183,30 +183,30 @@ branch. On Gitlab it is not possible to fork only the default. (fn FORK REMOTE ALL)" t) (autoload 'forge-merge "forge-commands" nil t) -(autoload 'forge-set-default-branch "forge-commands" "\ -Change the default branch on the upstream remote and locally. +(autoload 'forge-set-default-branch "forge-commands" +"Change the default branch on the upstream remote and locally. Also update the upstream branches of local branches accordingly." t) -(autoload 'forge-rename-default-branch "forge-commands" "\ -Rename the default branch on the upstream remote and locally. +(autoload 'forge-rename-default-branch "forge-commands" +"Rename the default branch on the upstream remote and locally. Also update the upstream branches of local branches accordingly." t) (autoload 'forge-add-pullreq-refspec "forge-commands" nil t) (autoload 'forge-add-repository "forge-commands" nil t) -(autoload 'forge-add-user-repositories "forge-commands" "\ -Add all of USER's repositories from HOST to the database. +(autoload 'forge-add-user-repositories "forge-commands" +"Add all of USER's repositories from HOST to the database. This may take a while. Only Github is supported at the moment. (fn HOST USER)" t) -(autoload 'forge-add-organization-repositories "forge-commands" "\ -Add all of ORGANIZATION's repositories from HOST to the database. +(autoload 'forge-add-organization-repositories "forge-commands" +"Add all of ORGANIZATION's repositories from HOST to the database. This may take a while. Only Github is supported at the moment. (fn HOST ORGANIZATION)" t) -(autoload 'forge-remove-repository "forge-commands" "\ -Remove a repository from the database. +(autoload 'forge-remove-repository "forge-commands" +"Remove a repository from the database. (fn REPOSITORY)" t) -(autoload 'forge-remove-topic-locally "forge-commands" "\ -Remove a topic from the local database only. +(autoload 'forge-remove-topic-locally "forge-commands" +"Remove a topic from the local database only. When the region marks multiple topics, then offer to remove them all. @@ -221,8 +221,8 @@ when that happens, because given how the APIs work, this would be too expensive. (fn TOPIC)" t) -(autoload 'forge-reset-database "forge-commands" "\ -Move the current database file to the trash. +(autoload 'forge-reset-database "forge-commands" +"Move the current database file to the trash. This is useful after the database scheme has changed, which will happen a few times while the forge functionality is still under heavy development." t) diff --git a/elpa/forge-20251201.1658/forge-bitbucket.el b/elpa/forge-20260423.1757/forge-bitbucket.el similarity index 97% rename from elpa/forge-20251201.1658/forge-bitbucket.el rename to elpa/forge-20260423.1757/forge-bitbucket.el index 86959920..5271ab1b 100644 --- a/elpa/forge-20251201.1658/forge-bitbucket.el +++ b/elpa/forge-20260423.1757/forge-bitbucket.el @@ -1,6 +1,6 @@ ;;; forge-bitbucket.el --- Bitbucket support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli diff --git a/elpa/forge-20251201.1658/forge-client.el b/elpa/forge-20260423.1757/forge-client.el similarity index 83% rename from elpa/forge-20251201.1658/forge-client.el rename to elpa/forge-20260423.1757/forge-client.el index 5a874b83..8162cc68 100644 --- a/elpa/forge-20251201.1658/forge-client.el +++ b/elpa/forge-20260423.1757/forge-client.el @@ -1,6 +1,6 @@ ;;; forge-client.el --- GraphQL and REST support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -126,31 +126,32 @@ (defun forge--set-field-callback (topic) (let ((repo (forge-get-repository topic))) (cond - ((forge-gitlab-repository--eieio-childp repo) - ;; TODO Fetch single topic for Gitlab as well. - (lambda (&rest _) - (forge--pull repo #'forge-refresh-buffer))) - ((forge-discussion--eieio-childp topic) - ;; See comment in `forge--update-status'. - (let ((status (oref topic status))) - (lambda (&rest _) - (forge--query repo - (ghub--graphql-prepare-query - forge--github-repository-query - `(repository discussions (discussion . ,(oref topic number)))) - `((owner . ,(oref repo owner)) - (name . ,(oref repo name))) - :callback (lambda (data) - (forge--update-discussion repo (cdr (cadr (cadr data)))) - (oset topic status status) - (forge-refresh-buffer)))))) - ((lambda (&rest _) - (forge--pull-topic (forge-get-repository topic) topic)))))) + ((forge-gitlab-repository--eieio-childp repo) + ;; TODO Fetch single topic for Gitlab as well. + (lambda (&rest _) + (forge--pull repo #'forge-refresh-buffer))) + ((forge-discussion--eieio-childp topic) + ;; See comment in `forge--update-status'. + (let ((status (oref topic status))) + (lambda (&rest _) + (forge--query repo + (ghub--graphql-prepare-query + forge--github-repository-query + `(repository discussions (discussion . ,(oref topic number)))) + `((owner . ,(oref repo owner)) + (name . ,(oref repo name))) + :callback (lambda (data) + (forge--update-discussion repo (cdr (cadr (cadr data)))) + (oset topic status status) + (forge-refresh-buffer)))))) + ((lambda (&rest _) + (forge--pull-topic (forge-get-repository topic) topic)))))) ;;; _ ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-commands.el b/elpa/forge-20260423.1757/forge-commands.el similarity index 84% rename from elpa/forge-20251201.1658/forge-commands.el rename to elpa/forge-20260423.1757/forge-commands.el index e411e6c5..00306d44 100644 --- a/elpa/forge-20251201.1658/forge-commands.el +++ b/elpa/forge-20260423.1757/forge-commands.el @@ -1,6 +1,6 @@ ;;; forge-commands.el --- Commands -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -73,10 +73,10 @@ Takes the pull-request as only argument and must return a directory." ("c f" "fork or remote" forge-fork)] [:description (lambda () (cond - ((forge-get-repository :tracked?) "Actions") - ((or (magit-gitdir) (forge-repository-at-point)) - "Forge does not yet track this repository") - ("Not inside a Git repository"))) + ((forge-get-repository :tracked?) "Actions") + ((or (magit-gitdir) (forge-repository-at-point)) + "Forge does not yet track this repository") + ("Not inside a Git repository"))) ("/ a" forge-add-repository :description (lambda () (let ((repo (forge-get-repository :stub?))) (if (or (not repo) @@ -288,11 +288,11 @@ argument also offer closed pull-requests." (defun forge-browse-commit (commit) "Read a COMMIT and visit it using a browser." (interactive - (list (or (magit-completing-read "Browse commit" - (magit-list-branch-names) - nil nil nil 'magit-revision-history - (magit-branch-or-commit-at-point)) - (user-error "Nothing selected")))) + (list (or (magit-completing-read "Browse commit" + (magit-list-branch-names) + nil nil nil 'magit-revision-history + (magit-branch-or-commit-at-point)) + (user-error "Nothing selected")))) (browse-url (forge-get-url :commit commit))) ;;;###autoload @@ -388,23 +388,23 @@ commit, and for a file." (defun forge--browse-blob-args () (cond - (magit-buffer-file-name - `(,(or magit-buffer-refname magit-buffer-revision) - ,(magit-file-relative-name magit-buffer-file-name) - ,@(magit-file-region-line-numbers) - ,current-prefix-arg)) - (buffer-file-name - `(nil - ,(magit-file-relative-name buffer-file-name) - ,@(magit-file-region-line-numbers) - ,current-prefix-arg)) - ((derived-mode-p 'dired-mode) - `(nil - ,(magit-file-relative-name (dired-get-filename)) - ,current-prefix-arg)) - ((let ((commit (magit-read-local-branch-or-commit - "Browse file from commit"))) - (list commit (magit-read-file-from-rev commit "Browse file")))))) + (magit-buffer-file-name + `(,(or magit-buffer-refname magit-buffer-revision) + ,(magit-file-relative-name magit-buffer-file-name) + ,@(magit-file-region-line-numbers) + ,current-prefix-arg)) + (buffer-file-name + `(nil + ,(magit-file-relative-name buffer-file-name) + ,@(magit-file-region-line-numbers) + ,current-prefix-arg)) + ((derived-mode-p 'dired-mode) + `(nil + ,(magit-file-relative-name (dired-get-filename)) + ,current-prefix-arg)) + ((let ((commit (magit-read-local-branch-or-commit + "Browse file from commit"))) + (list commit (magit-read-file-from-rev commit "Browse file")))))) ;;;; Urls @@ -479,7 +479,7 @@ commit, and for a file." (cl-defmethod forge-get-url ((notify forge-notification)) (oref notify url)) - ;; Transitional kludge for the infamous package.el defect. +;; Transitional kludge for the infamous package.el defect. (require 'forge-forgejo) (cl-defmethod forge-format-blob-lines ((repo forge-repository) line end) @@ -566,12 +566,12 @@ With prefix argument MENU, also show the topic menu." (interactive (list current-prefix-arg)) (forge-topic-setup-buffer (forge-topic-at-point)) (cond - ((eq transient-current-command 'forge-topic-menu) - (setq forge--quit-keep-topic-menu t)) - ((or menu - (memq transient-current-command - '(forge-topics-menu forge-notifications-menu))) - (transient-setup 'forge-topic-menu)))) + ((eq transient-current-command 'forge-topic-menu) + (setq forge--quit-keep-topic-menu t)) + ((or menu + (memq transient-current-command + '(forge-topics-menu forge-notifications-menu))) + (transient-setup 'forge-topic-menu)))) ;;;###autoload (defun forge-visit-this-repository () @@ -580,25 +580,25 @@ With prefix argument MENU, also show the topic menu." (let* ((repo (forge-repository-at-point)) (worktree (forge-get-worktree repo))) (cond - ((and (eq transient-current-command 'forge-repositories-menu) - (forge-get-repository repo nil :tracked?)) - (cond-let - ([buffer (get-buffer (forge-topics-buffer-name repo))] - (switch-to-buffer buffer) - (transient-setup 'forge-topics-menu)) - ((forge-list-topics repo)))) - (worktree - (magit-status-setup-buffer worktree)) - ((forge-get-repository repo nil :tracked?) - (forge-list-topics repo)) - ((user-error "Not tracked and location of clone is unknown"))))) + ((and (eq transient-current-command 'forge-repositories-menu) + (forge-get-repository repo nil :tracked?)) + (cond-let + ([buffer (get-buffer (forge-topics-buffer-name repo))] + (switch-to-buffer buffer) + (transient-setup 'forge-topics-menu)) + ((forge-list-topics repo)))) + (worktree + (magit-status-setup-buffer worktree)) + ((forge-get-repository repo nil :tracked?) + (forge-list-topics repo)) + ((user-error "Not tracked and location of clone is unknown"))))) ;;; Create (defun forge-create-discussion (category) "Create a new discussion for the current repository." (interactive - (list (forge-read-topic-category nil "Category for new discussion"))) + (list (forge-read-topic-category nil "Category for new discussion"))) (forge--setup-post-buffer 'new-discussion #'forge--submit-create-discussion "new-discussion" "Create new discussion on %p" `((forge--buffer-category ,category)))) @@ -646,28 +646,29 @@ With prefix argument MENU, also show the topic menu." "Source branch" (magit-list-remote-branch-names) nil t nil 'magit-revision-history - (or (and-let ((d (magit-branch-at-point))) - (if (magit-remote-branch-p d) - d - (magit-get-push-branch d t))) - (and-let ((d (magit-get-current-branch))) - (if (magit-remote-branch-p d) - d - (magit-get-push-branch d t)))))) + (or (and> (magit-branch-at-point) + (if (magit-remote-branch-p $) + $ + (magit-get-push-branch $ t))) + (and> (magit-get-current-branch) + (if (magit-remote-branch-p $) + $ + (magit-get-push-branch $ t)))))) (remote (oref repo remote)) (targets (delete source (magit-list-remote-branch-names remote))) (target (magit-completing-read "Target branch" targets nil t nil 'magit-revision-history - (let* ((d (cdr (magit-split-branch-name source))) - (d (and (magit-branch-p d) d)) - (d (and d (magit-get-upstream-branch d))) - (d (and d (if (magit-remote-branch-p d) - d - (magit-get-upstream-branch d)))) - (d (or d (concat remote "/" - (or (oref repo default-branch) - "master"))))) - (car (member d targets)))))) + (or (and> (cdr (magit-split-branch-name source)) + (and (magit-branch-p $) + (magit-get-upstream-branch $)) + (if (magit-remote-branch-p $) + $ + (magit-get-upstream-branch $)) + (car (member $ targets))) + (seq-some (##car (member (concat remote "/" %) targets)) + (delete-dups + (cons (oref repo default-branch) + magit-main-branch-names))))))) (list source target))) (defun forge-create-post (&optional quote) @@ -679,12 +680,12 @@ point is currently on." (unless (derived-mode-p 'forge-topic-mode) (user-error "This command is only available from topic buffers")) (let* ((quote (cond - ((not (magit-section-match 'post)) nil) - ((use-region-p) - (buffer-str (region-beginning) (region-end))) - (quote - (with-slots (content end) (magit-current-section) - (string-trim (buffer-str content end)))))) + ((not (magit-section-match 'post)) nil) + ((use-region-p) + (buffer-str (region-beginning) (region-end))) + (quote + (with-slots (content end) (magit-current-section) + (string-trim (buffer-str content end)))))) (quote (and quote (lambda () (goto-char (point-max)) @@ -945,10 +946,10 @@ This is like `forge-checkout-pullreq', except that it also creates a new worktree. Please see the manual for more information." (interactive - (let ((id (forge-read-pullreq "Checkout pull request"))) - (list (funcall forge-checkout-worktree-read-directory-function - (forge-get-pullreq id)) - id))) + (let ((id (forge-read-pullreq "Checkout pull request"))) + (list (funcall forge-checkout-worktree-read-directory-function + (forge-get-pullreq id)) + id))) (when (and (file-exists-p path) (not (and (file-directory-p path) (length= (directory-files path) 2)))) @@ -1015,42 +1016,42 @@ number) and this command is made available as a substitute in the (defun forge-create-mark (name face description) "Define a new mark that topics can be marked with." (interactive - (list (read-string "Name: ") - (magit-read-char-case "Set appearance using " nil - (?n "a face [n]ame" - (read-face-name "Face name: ")) - (?s "face [s]exp" - (read-from-minibuffer - "Face sexp: " - "(:background \"\" :foreground \"\" :box t)" - read-expression-map t))) - (let ((str (read-string "Description: "))) - (and (not (equal str "")) str)))) + (list (read-string "Name: ") + (magit-read-char-case "Set appearance using " nil + (?n "a face [n]ame" + (read-face-name "Face name: ")) + (?s "face [s]exp" + (read-from-minibuffer + "Face sexp: " + "(:background \"\" :foreground \"\" :box t)" + read-expression-map t))) + (let ((str (read-string "Description: "))) + (and (not (equal str "")) str)))) (forge-sql [:insert-into mark :values $v1] (vector nil (forge--uuid) name face description))) (defun forge-edit-mark (id name face description) "Define a new mark that topics can be marked with." (interactive - (pcase-let* - ((marks (forge-sql [:select [name id face description] :from mark])) - (`(,name ,id ,face ,description) - (assoc (completing-read "Edit mark" (mapcar #'car marks) nil t) - marks))) - (list id - (read-string "Name: " name) - (magit-read-char-case "Set appearance using " nil - (?n "a face [n]ame" - (read-face-name "Face name: " (and (symbolp face) face))) - (?s "face [s]exp" - (read-from-minibuffer - "Face sexp: " - (if (listp face) - (format "%S" face) - "(:background \"\" :foreground \"\" :box t)") - read-expression-map t))) - (let ((str (read-string "Description: " nil nil description))) - (and (not (equal str "")) str))))) + (pcase-let* + ((marks (forge-sql [:select [name id face description] :from mark])) + (`(,name ,id ,face ,description) + (assoc (completing-read "Edit mark" (mapcar #'car marks) nil t) + marks))) + (list id + (read-string "Name: " name) + (magit-read-char-case "Set appearance using " nil + (?n "a face [n]ame" + (read-face-name "Face name: " (and (symbolp face) face))) + (?s "face [s]exp" + (read-from-minibuffer + "Face sexp: " + (if (listp face) + (format "%S" face) + "(:background \"\" :foreground \"\" :box t)") + read-expression-map t))) + (let ((str (read-string "Description: " nil nil description))) + (and (not (equal str "")) str))))) (forge-sql [:update mark :set (= [name face description] $v1) :where (= id $s2)] @@ -1068,14 +1069,14 @@ is added anyway. Currently this only supports Github and Gitlab. With prefix argument ALL, fork all branches, not just the default branch. On Gitlab it is not possible to fork only the default." (interactive - (let ((fork (magit-completing-read "Fork to" - (mapcar #'car forge-owned-accounts)))) - (list fork - (read-string "Remote name: " - (or (plist-get (cdr (assoc fork forge-owned-accounts)) - 'remote-name) - fork)) - current-prefix-arg))) + (let ((fork (magit-completing-read "Fork to" + (mapcar #'car forge-owned-accounts)))) + (list fork + (read-string "Remote name: " + (or (plist-get (cdr (assoc fork forge-owned-accounts)) + 'remote-name) + fork)) + current-prefix-arg))) (let ((repo (forge-get-repository :stub))) (forge--fork-repository repo fork all) (magit-remote-add remote @@ -1101,7 +1102,7 @@ as merged." (let ((pullreq (forge-get-pullreq pullreq))) (forge--merge-pullreq (forge-get-repository pullreq) pullreq - (magit-rev-hash + (magit-commit-oid (forge--pullreq-branch-internal pullreq)) method))) @@ -1279,11 +1280,11 @@ upstream remote." (propertize (forge--scope 'topdir) 'face 'bold)) (if-let* ((remote (forge--get-remote)) (url (magit-git-string "remote" "get-url" remote))) - (format (propertize "because %s is not on a host known to Forge." - 'face 'transient-heading) - (propertize url 'face 'bold)) - (propertize "because no suitable remote was detected." - 'face 'transient-heading)))) + (format (propertize "because %s is not on a host known to Forge." + 'face 'transient-heading) + (propertize url 'face 'bold)) + (propertize "because no suitable remote was detected." + 'face 'transient-heading)))) ("r" forge-forge.remote :format " %k Try another %d %v" :face 'bold) ("h" "Learn how to configure another Github host" (lambda () (interactive) (info "(forge)Setup for Another Github Instance"))) @@ -1307,8 +1308,8 @@ upstream remote." ("s" "pulling only topics since " (lambda (repo date) (interactive - (list (forge--scope 'repo) - (forge-read-date "Limit pulling to topics updated since: "))) + (list (forge--scope 'repo) + (forge-read-date "Limit pulling to topics updated since: "))) (forge-add-repository repo date))) ("i" "to allow pulling of individual topics" (lambda (repo) @@ -1324,33 +1325,33 @@ upstream remote." (declare (interactive-only nil)) (interactive) (cond - ((not repo) - (transient-setup 'forge-add-repository nil nil - :scope (forge-add-repository--scope))) - ((stringp repo) - (transient-setup 'forge-add-repository nil nil - :scope (forge-add-repository--scope repo))) - (t - (when-let* - ((_(not (eq limit :selective))) - (_(magit-git-config-p "forge.autoPull" t)) - (remote (oref repo remote)) - (refspec (oref repo pullreq-refspec)) - (default-directory (forge-get-worktree repo)) - (_(and (not (member refspec (magit-get-all "remote" remote "fetch"))) - (or (eq forge-add-pullreq-refspec t) - (and (eq forge-add-pullreq-refspec 'ask) - (y-or-n-p (format "Also add %S refspec? " refspec))))))) - (magit-call-git "config" "--add" - (format "remote.%s.fetch" remote) - refspec)) - (setq repo (forge-get-repository repo nil :insert!)) - (when (eq limit :selective) - (oset repo selective-p t) - (setq limit nil)) - (forge--pull repo - (and (not (forge-get-worktree repo)) #'ignore) - limit)))) + ((not repo) + (transient-setup 'forge-add-repository nil nil + :scope (forge-add-repository--scope))) + ((stringp repo) + (transient-setup 'forge-add-repository nil nil + :scope (forge-add-repository--scope repo))) + (t + (when-let* + ((_(not (eq limit :selective))) + (_(magit-git-config-p "forge.autoPull" t)) + (remote (oref repo remote)) + (refspec (oref repo pullreq-refspec)) + (default-directory (forge-get-worktree repo)) + (_(and (not (member refspec (magit-get-all "remote" remote "fetch"))) + (or (eq forge-add-pullreq-refspec t) + (and (eq forge-add-pullreq-refspec 'ask) + (y-or-n-p (format "Also add %S refspec? " refspec))))))) + (magit-call-git "config" "--add" + (format "remote.%s.fetch" remote) + refspec)) + (setq repo (forge-get-repository repo nil :insert!)) + (when (eq limit :selective) + (oset repo selective-p t) + (setq limit nil)) + (forge--pull repo + (and (not (forge-get-worktree repo)) #'ignore) + limit)))) (defun forge-add-repository--scope (&optional directory) (let* ((repo (if directory @@ -1376,22 +1377,22 @@ upstream remote." (defun forge-add-some-repository (url) "Read a repository and add it to the database." (interactive - (let (ret url) - (while (not ret) - (setq url (magit-read-string-ns - "Add repository to database (url, owner/name, or name)" url)) - (unless (string-match-p "\\(://\\|@\\)" url) - (setq url (magit-clone--name-to-url url))) - (cond ((forge-get-repository url nil :tracked?) - (message "%s is already being tracked locally" - (propertize url 'face 'bold)) - (sit-for 3)) - ((not (forge-get-repository url nil :valid?)) - (message "%s does not exist or is inaccessible" - (propertize url 'face 'bold)) - (sit-for 3)) - ((setq ret url)))) - (list ret))) + (let (ret url) + (while (not ret) + (setq url (magit-read-string-ns + "Add repository to database (url, owner/name, or name)" url)) + (unless (string-match-p "\\(://\\|@\\)" url) + (setq url (magit-clone--name-to-url url))) + (cond ((forge-get-repository url nil :tracked?) + (message "%s is already being tracked locally" + (propertize url 'face 'bold)) + (sit-for 3)) + ((not (forge-get-repository url nil :valid?)) + (message "%s does not exist or is inaccessible" + (propertize url 'face 'bold)) + (sit-for 3)) + ((setq ret url)))) + (list ret))) (forge-add-repository url)) ;;;###autoload @@ -1399,9 +1400,9 @@ upstream remote." "Add all of USER's repositories from HOST to the database. This may take a while. Only Github is supported at the moment." (interactive - (list (forge-read-host "Add repositories from Github host" - 'forge-github-repository) - (read-string "User: "))) + (list (forge-read-host "Add repositories from Github host" + 'forge-github-repository) + (read-string "User: "))) (forge--add-user-repos 'forge-github-repository host user)) ;;;###autoload @@ -1409,9 +1410,9 @@ This may take a while. Only Github is supported at the moment." "Add all of ORGANIZATION's repositories from HOST to the database. This may take a while. Only Github is supported at the moment." (interactive - (list (forge-read-host "Add repositories from Github host" - 'forge-github-repository) - (read-string "Organization: "))) + (list (forge-read-host "Add repositories from Github host" + 'forge-github-repository) + (read-string "Organization: "))) (forge--add-organization-repos 'forge-github-repository host organization)) ;;; Cleanup @@ -1420,12 +1421,12 @@ This may take a while. Only Github is supported at the moment." (defun forge-remove-repository (repository) "Remove a repository from the database." (interactive - (pcase-let* ((repo (forge-read-repository "Remove repository from db")) - ((eieio githost owner name) repo)) - (if (yes-or-no-p (format "Do you really want to remove \"%s/%s @%s\" %s? " - owner name githost "from the database")) - (list repo) - (user-error "Abort")))) + (pcase-let* ((repo (forge-read-repository "Remove repository from db")) + ((eieio githost owner name) repo)) + (if (yes-or-no-p (format "Do you really want to remove \"%s/%s @%s\" %s? " + owner name githost "from the database")) + (list repo) + (user-error "Abort")))) (closql-delete repository) (forge-refresh-buffer)) @@ -1445,12 +1446,12 @@ forge (the service). Forge (the package) cannot automatically detect when that happens, because given how the APIs work, this would be too expensive." (interactive - (list (if-let* ((topics (magit-region-values '(issue pullreq) t)) - (_(magit-confirm 'remove-topics-locally nil - "Delete %d topics locally" nil - (mapcar #'forge--format-topic-line topics)))) - topics - (forge-read-topic "Delete topic LOCALLY only")))) + (list (if-let* ((topics (magit-region-values '(issue pullreq) t)) + (_(magit-confirm 'remove-topics-locally nil + "Delete %d topics locally" nil + (mapcar #'forge--format-topic-line topics)))) + topics + (forge-read-topic "Delete topic LOCALLY only")))) (if (listp topic) (progn (mapc #'closql-delete topic) (forge-refresh-buffer)) @@ -1478,33 +1479,6 @@ heavy development." ;;; Miscellaneous -(defun forge-mark-completed-topics-as-done () - "Mark completed topics of the current repository as done. -Change the private status to \"done\" for topics whose private status is -\"unread\" or \"pending\" and whose public state is \"completed\". -Whether this affects all such topics or only all such topics of a -certain type (discussion, issue or pull-request), depends on the -context." - (interactive) - (let* ((type (forge-current-topic-type)) - (desc (if (eq type 'pullreq) 'pull-request type)) - (topics (forge--list-topics - (forge--topics-spec :type type - :active nil - :state 'closed - :status 'inbox) - (forge-get-repository :tracked)))) - (cond ((not topics) - (message "No completed %s that could be marked as done" desc)) - ((magit-confirm t - "Mark \"%s\" as done" - (format "Mark %%d %ss as done" desc) - nil - (mapcar #'forge--format-topic-line topics)) - (dolist (topic topics) - (oset topic status 'done)) - (forge-refresh-buffer))))) - (magit-define-section-jumper forge-jump-to-pullreqs "Pull requests" pullreqs) (magit-define-section-jumper forge-jump-to-issues "Issues" issues) @@ -1512,6 +1486,7 @@ context." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let") diff --git a/elpa/forge-20251201.1658/forge-core.el b/elpa/forge-20260423.1757/forge-core.el similarity index 85% rename from elpa/forge-20251201.1658/forge-core.el rename to elpa/forge-20260423.1757/forge-core.el index fb6203be..d6db3bd4 100644 --- a/elpa/forge-20251201.1658/forge-core.el +++ b/elpa/forge-20260423.1757/forge-core.el @@ -1,6 +1,6 @@ ;;; forge-core.el --- Core functionality -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -252,36 +252,36 @@ is non-nil." (defun forge--split-forge-url (url &optional relax) (save-match-data (cond - ((string-match - (concat "\\`" - "\\(?:git://\\|" - "[^/@]+@\\|" - "\\(?:ssh\\|ssh\\+git\\|git\\+ssh\\)://\\(?:[^/@]+@\\)?\\|" - "https?://\\(?:[^/@]+@\\)?\\)?" - (if relax - "\\(?1:[^:/]+\\)" - (regexp-opt (mapcar #'car forge-alist) t)) - "\\(?::[0-9]+\\)?" - "\\(?:/\\|:/?\\)" - "~?\\(?2:.+?\\)/" - "\\(?3:[^/]+?\\)" - "\\(?:\\.git\\|/\\)?" - "\\'") - url) - (and-let ((elt (forge--get-forge-host (match-string 1 url) (not relax)))) - ;; Return the WEBHOST (not the GITHOST, URLs passed to this - ;; function usually contain a GITHOST) because the IDs used to - ;; identify a repository in the database are based on WEBHOSTs. - (list (caddr elt) - (match-string 2 url) - (match-string 3 url)))) - ((not relax) - ;; The host part didn't match any GITHOST in `forge-alist', but it - ;; might be a ssh host alias. We have to relax strictness; in the - ;; extremely unlikely case that there is a common path between the - ;; HOST and the OWNER for this forge, we would incorrectly end up - ;; making that path part of the owner. - (forge--split-forge-url url t))))) + ((string-match + (concat "\\`" + "\\(?:git://\\|" + "[^/@]+@\\|" + "\\(?:ssh\\|ssh\\+git\\|git\\+ssh\\)://\\(?:[^/@]+@\\)?\\|" + "https?://\\(?:[^/@]+@\\)?\\)?" + (if relax + "\\(?1:[^:/]+\\)" + (regexp-opt (mapcar #'car forge-alist) t)) + "\\(?::[0-9]+\\)?" + "\\(?:/\\|:/?\\)" + "~?\\(?2:.+?\\)/" + "\\(?3:[^/]+?\\)" + "\\(?:\\.git\\|/\\)?" + "\\'") + url) + (and-let ((elt (forge--get-forge-host (match-string 1 url) (not relax)))) + ;; Return the WEBHOST (not the GITHOST, URLs passed to this + ;; function usually contain a GITHOST) because the IDs used to + ;; identify a repository in the database are based on WEBHOSTs. + (list (caddr elt) + (match-string 2 url) + (match-string 3 url)))) + ((not relax) + ;; The host part didn't match any GITHOST in `forge-alist', but it + ;; might be a ssh host alias. We have to relax strictness; in the + ;; extremely unlikely case that there is a common path between the + ;; HOST and the OWNER for this forge, we would incorrectly end up + ;; making that path part of the owner. + (forge--split-forge-url url t))))) ;;; Identity @@ -296,46 +296,46 @@ is non-nil." "Return the forge's ID for ARG. This deals with technical debt related to our handling of IDs." (cond - (type - (pcase type - ('assignee - (forge-sql1 [:select [forge-id] - :from assignee - :where (and (= repository $s1) - (= login $s2))] - (oref repo id) arg)) - ('assignees - (forge-sql-car [:select [forge-id] - :from assignee - :where (and (= repository $s1) - (in login $v2))] - (oref repo id) - (vconcat arg))) - ('category - (forge-sql1 [:select [their-id] - :from discussion-category - :where (and (= repository $s1) - (= name $s2))] - (oref repo id) arg)) - ('label - (forge--their-id - (forge-sql1 [:select [id] - :from label + (type + (pcase type + ('assignee + (forge-sql1 [:select [forge-id] + :from assignee + :where (and (= repository $s1) + (= login $s2))] + (oref repo id) arg)) + ('assignees + (forge-sql-car [:select [forge-id] + :from assignee + :where (and (= repository $s1) + (in login $v2))] + (oref repo id) + (vconcat arg))) + ('category + (forge-sql1 [:select [their-id] + :from discussion-category :where (and (= repository $s1) (= name $s2))] - (oref repo id) arg))) - ('labels - (mapcar (##forge--their-id % 'label repo) arg)) - ('milestone - (forge--their-id - (forge-sql1 [:select [id] :from milestone :where (= title $s1)] arg))))) - ((stringp arg) - (car (last (split-string (base64-decode-string arg) ":")))) - ((slot-exists-p arg 'their-id) - (oref arg their-id)) - ((slot-exists-p arg 'forge-id) - (oref arg forge-id)) - ((forge--their-id (oref arg id))))) + (oref repo id) arg)) + ('label + (forge--their-id + (forge-sql1 [:select [id] + :from label + :where (and (= repository $s1) + (= name $s2))] + (oref repo id) arg))) + ('labels + (mapcar (##forge--their-id % 'label repo) arg)) + ('milestone + (forge--their-id + (forge-sql1 [:select [id] :from milestone :where (= title $s1)] arg))))) + ((stringp arg) + (car (last (split-string (base64-decode-string arg) ":")))) + ((slot-exists-p arg 'their-id) + (oref arg their-id)) + ((slot-exists-p arg 'forge-id) + (oref arg forge-id)) + ((forge--their-id (oref arg id))))) (cl-defmethod magit-section-ident-value ((obj forge-object)) "Return the value ob OBJ's `id' slot. @@ -480,6 +480,7 @@ Optional END defaults to the value of `point-max'." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-db.el b/elpa/forge-20260423.1757/forge-db.el similarity index 99% rename from elpa/forge-20251201.1658/forge-db.el rename to elpa/forge-20260423.1757/forge-db.el index eae46b07..58cf0c90 100644 --- a/elpa/forge-20251201.1658/forge-db.el +++ b/elpa/forge-20260423.1757/forge-db.el @@ -1,6 +1,6 @@ ;;; forge-db.el --- Database implementation -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -640,7 +640,7 @@ (emacsql db [:create-table discussion-post $S1] (cdr (assq 'discussion-post forge--db-table-schemata))) (emacsql db [:create-table discussion-reply $S1] - (cdr (assq 'discussion-reply forge--db-table-schemata)))) + (cdr (assq 'discussion-reply forge--db-table-schemata))) (emacsql db [:alter-table repository :add-column discussion-categories :default 'eieio-unbound]) (emacsql db [:alter-table repository :add-column discussions @@ -648,7 +648,7 @@ (emacsql db [:alter-table repository :add-column discussions-p :default nil]) (emacsql db [:alter-table repository :add-column discussions-until - :default nil]) + :default nil])) )) (defun forge--backup-database (db) @@ -665,6 +665,7 @@ ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-discussion.el b/elpa/forge-20260423.1757/forge-discussion.el similarity index 98% rename from elpa/forge-20251201.1658/forge-discussion.el rename to elpa/forge-20260423.1757/forge-discussion.el index 4aa73211..cb0f5312 100644 --- a/elpa/forge-20251201.1658/forge-discussion.el +++ b/elpa/forge-20260423.1757/forge-discussion.el @@ -1,6 +1,6 @@ ;;; forge-discussion.el --- Discussion support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -195,7 +195,8 @@ can be selected from the start." (forge--read-topic prompt #'forge-current-discussion (forge--topics-spec :type 'discussion :active t) - (forge--topics-spec :type 'discussion :active nil :state nil))) + (forge--topics-spec :type 'discussion :active nil + :state nil :limit nil))) (defun forge-read-topic-category (&optional topic prompt) (magit-completing-read @@ -277,6 +278,7 @@ and optional HEADING to change the section heading." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-forgejo.el b/elpa/forge-20260423.1757/forge-forgejo.el similarity index 97% rename from elpa/forge-20251201.1658/forge-forgejo.el rename to elpa/forge-20260423.1757/forge-forgejo.el index 2cd0a306..3788e82c 100644 --- a/elpa/forge-20251201.1658/forge-forgejo.el +++ b/elpa/forge-20260423.1757/forge-forgejo.el @@ -1,6 +1,6 @@ ;;; forge-forgejo.el --- Forgejo support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli diff --git a/elpa/forge-20251201.1658/forge-gitea.el b/elpa/forge-20260423.1757/forge-gitea.el similarity index 96% rename from elpa/forge-20251201.1658/forge-gitea.el rename to elpa/forge-20260423.1757/forge-gitea.el index eb7b976b..fc1fe4fa 100644 --- a/elpa/forge-20251201.1658/forge-gitea.el +++ b/elpa/forge-20260423.1757/forge-gitea.el @@ -1,6 +1,6 @@ ;;; forge-gitea.el --- Gitea support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -46,6 +46,7 @@ ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-github.el b/elpa/forge-20260423.1757/forge-github.el similarity index 99% rename from elpa/forge-20251201.1658/forge-github.el rename to elpa/forge-20260423.1757/forge-github.el index 639e93fc..0d29a350 100644 --- a/elpa/forge-20251201.1658/forge-github.el +++ b/elpa/forge-20260423.1757/forge-github.el @@ -1,6 +1,6 @@ ;;; forge-github.el --- Github support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -95,12 +95,12 @@ emoji isAnswerable description) - ( discussions [(:edges t) + ( discussions [(:edges 20) (:singular discussion number) (orderBy ((field UPDATED_AT) (direction DESC)))] + number id databaseId - number url stateReason ;; Discussions lack isReadByViewer. @@ -120,7 +120,7 @@ createdAt updatedAt body - ( replies [(:edges 20)] + ( replies [(:edges t)] id databaseId (author login) @@ -235,9 +235,9 @@ (oset repo condition :tracked)) (forge--msg repo t t "Storing REPO") (cond - ((oref repo selective-p)) - (callback (funcall callback)) - ((forge--maybe-git-fetch repo buf)))) + ((oref repo selective-p)) + (callback (funcall callback)) + ((forge--maybe-git-fetch repo buf)))) :narrow '(repository) :until ;; Keys have the form `FIELD-until', where FIELD is the name of a @@ -359,8 +359,8 @@ [($owner String!) ($name String!)] (repository - [(owner $owner) - (name $name)] + [(owner $owner) + (name $name)] ,(caddr (caddr (ghub--graphql-prepare-query forge--github-repository-query `(repository discussions (discussion . ,number))))) @@ -1266,7 +1266,7 @@ (cl-defmethod forge--fork-repository ((repo forge-github-repository) fork all) (with-slots (name apihost) repo (forge-rest repo "POST" "/repos/:owner/:name/forks" - ((and (not (equal fork (ghub--username apihost))) + ((and (not (equal fork (ghub--username repo))) (organization fork)) (default-branch-only (not all)))) (ghub-wait (format "/repos/%s/%s" fork name) @@ -1298,6 +1298,7 @@ ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let") diff --git a/elpa/forge-20251201.1658/forge-gitlab.el b/elpa/forge-20260423.1757/forge-gitlab.el similarity index 74% rename from elpa/forge-20251201.1658/forge-gitlab.el rename to elpa/forge-20260423.1757/forge-gitlab.el index f5c98d51..bb55b174 100644 --- a/elpa/forge-20251201.1658/forge-gitlab.el +++ b/elpa/forge-20260423.1757/forge-gitlab.el @@ -1,6 +1,6 @@ ;;; forge-gitlab.el --- Gitlab support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -51,54 +51,51 @@ (cl-assert (not (and since (forge-get-repository repo nil :tracked?)))) (setq forge--mode-line-buffer (current-buffer)) (forge--msg repo t nil "Pulling REPO") - (let ((cb (let ((buf (current-buffer)) - (val nil)) - (lambda (cb &optional v) - (when v (if val (push v val) (setq val v))) - (let-alist val - (cond - ((not val) - (forge--fetch-repository repo cb)) - ((not (assq 'assignees val)) - (forge--fetch-assignees repo cb)) - ((not (assq 'forks val)) - (forge--fetch-forks repo cb)) - ((not (assq 'labels val)) - (forge--fetch-labels repo cb)) - ((and .issues_enabled - (not (assq 'issues val))) - (forge--fetch-issues repo cb since)) - ((and .merge_requests_enabled - (not (assq 'pullreqs val))) - (forge--fetch-pullreqs repo cb since)) - (t - (forge--msg repo t t "Pulling REPO") - (forge--msg repo t nil "Storing REPO") - (closql-with-transaction (forge-db) - (forge--update-repository repo val) - (forge--update-assignees repo .assignees) - (forge--update-labels repo .labels) - (dolist (v .issues) (forge--update-issue repo v)) - (dolist (v .pullreqs) (forge--update-pullreq repo v)) - (oset repo condition :tracked)) - (forge--msg repo t t "Storing REPO") - (cond - ((oref repo selective-p)) + (let ((buffer (current-buffer)) + (value nil) + (step nil) + (skip (cond ((oref repo selective-p) + '(assignees forks labels issues pullreqs)) + ((magit-get-boolean "forge.omitExpensive") + '(assignees forks labels))))) + (named-let step (data) + (cond ((not value) + (when data + (setq value data) + (let-alist value + (unless .issues_enabled (cl-pushnew 'issues skip)) + (unless .merge_requests_enabled (cl-pushnew 'pullreqs skip))))) + ((push (cons step data) value))) + (cl-flet ((fetchp (sym) + (unless (or (memq sym skip) + (assq sym value)) + (setq step sym) + t))) + (cond ((not value) (forge--fetch-repository repo #'step)) + ((fetchp 'assignees) (forge--fetch-assignees repo #'step)) + ((fetchp 'forks) (forge--fetch-forks repo #'step)) + ((fetchp 'labels) (forge--fetch-labels repo #'step)) + ((fetchp 'issues) (forge--fetch-issues repo #'step since)) + ((fetchp 'pullreqs) (forge--fetch-pullreqs repo #'step since)) + (t + (forge--msg repo t t "Pulling REPO") + (forge--msg repo t nil "Storing REPO") + (let-alist value + (closql-with-transaction (forge-db) + (forge--update-repository repo value) + (forge--update-assignees repo .assignees) + (forge--update-labels repo .labels) + (forge--update-issues repo .issues) + (forge--update-pullreqs repo .pullreqs) + (oset repo condition :tracked))) + (forge--msg repo t t "Storing REPO") + (cond ((oref repo selective-p)) (callback (funcall callback)) - ((forge--maybe-git-fetch repo buf)))))))))) - (funcall cb cb))) + ((forge--maybe-git-fetch repo buffer))))))))) (cl-defmethod forge--fetch-repository ((repo forge-gitlab-repository) callback) (forge--glab-get repo "/projects/:project" nil - :callback (lambda (value _headers _status _req) - (cond ((oref repo selective-p) - (setq value (append '((assignees) (forks) (labels) - (issues) (pullreqs)) - value))) - ((magit-get-boolean "forge.omitExpensive") - (setq value (append '((assignees) (forks) (labels)) - value)))) - (funcall callback callback value)))) + :callback callback)) (cl-defmethod forge--update-repository ((repo forge-gitlab-repository) data) (let-alist data @@ -128,45 +125,46 @@ ;;;; Issues (cl-defmethod forge--fetch-issues ((repo forge-gitlab-repository) callback since) - (let ((cb (let (val cur cnt pos) - (lambda (cb &optional v) + (letrec + (( cb (let (val cur cnt pos) + (lambda (&optional v) (cond - ((not pos) - (if (setq cur (setq val v)) - (progn - (setq pos 1) - (setq cnt (length val)) - (forge--msg nil nil nil "Pulling issue %s/%s" pos cnt) - (forge--fetch-issue-posts repo cur cb)) - (forge--msg repo t t "Pulling REPO issues") - (funcall callback callback (cons 'issues val)))) - (t - (if (setq cur (cdr cur)) - (progn - (cl-incf pos) - (forge--msg nil nil nil "Pulling issue %s/%s" pos cnt) - (forge--fetch-issue-posts repo cur cb)) - (forge--msg repo t t "Pulling REPO issues") - (funcall callback callback (cons 'issues val))))))))) + ((and (not pos) v) + (setq val v) + (setq cur v) + (setq pos 1) + (setq cnt (length val)) + (forge--msg nil nil nil "Pulling issue %s/%s" pos cnt) + (forge--fetch-issue-posts repo cur cb)) + ((setq cur (cdr cur)) + (cl-incf pos) + (forge--msg nil nil nil "Pulling issue %s/%s" pos cnt) + (forge--fetch-issue-posts repo cur cb)) + (t + (forge--msg repo t t "Pulling REPO issues") + (funcall callback val))))))) (forge--msg repo t nil "Pulling REPO issues") (forge--glab-get repo "/projects/:project/issues" `((per_page . 100) (order_by . "updated_at") - ,@(and-let ((after (or since (oref repo issues-until)))) - `((updated_after . ,after)))) + ,@(and$ (or since (oref repo issues-until)) + `((updated_after . ,$)))) :unpaginate t - :callback (lambda (value _headers _status _req) - (funcall cb cb value))))) + :callback cb))) (cl-defmethod forge--fetch-issue-posts ((repo forge-gitlab-repository) cur cb) - (let-alist (car cur) - (forge--glab-get repo - (format "/projects/%s/issues/%s/notes" .project_id .iid) - '((per_page . 100)) - :unpaginate t - :callback (lambda (value _headers _status _req) - (setf (alist-get 'notes (car cur)) value) - (funcall cb cb))))) + (forge--glab-get repo + (let-alist (car cur) + (format "/projects/%s/issues/%s/notes" .project_id .iid)) + '((per_page . 100)) + :unpaginate t + :callback (lambda (value) + (setf (alist-get 'notes (car cur)) value) + (funcall cb)))) + +(cl-defmethod forge--update-issues ((repo forge-gitlab-repository) data) + (dolist (v data) + (forge--update-issue repo v))) (cl-defmethod forge--update-issue ((repo forge-gitlab-repository) data) (closql-with-transaction (forge-db) @@ -219,50 +217,50 @@ ;;;; Pullreqs (cl-defmethod forge--fetch-pullreqs ((repo forge-gitlab-repository) callback since) - (let ((cb (let (val cur cnt pos) - (lambda (cb &optional v) + (letrec + (( cb (let (val cur cnt pos) + (lambda (&optional v) (cond - ((not pos) - (if (setq cur (setq val v)) - (progn - (setq pos 1) - (setq cnt (length val)) - (forge--msg nil nil nil "Pulling pullreq %s/%s" pos cnt) - (forge--fetch-pullreq-posts repo cur cb)) - (forge--msg repo t t "Pulling REPO pullreqs") - (funcall callback callback (cons 'pullreqs val)))) - ((not (assq 'source_project (car cur))) - (forge--fetch-pullreq-source-repo repo cur cb)) - ((not (assq 'target_project (car cur))) - (forge--fetch-pullreq-target-repo repo cur cb)) - (t - (if (setq cur (cdr cur)) - (progn - (cl-incf pos) - (forge--msg nil nil nil "Pulling pullreq %s/%s" pos cnt) - (forge--fetch-pullreq-posts repo cur cb)) - (forge--msg repo t t "Pulling REPO pullreqs") - (funcall callback callback (cons 'pullreqs val))))))))) + ((and (not pos) v) + (setq val v) + (setq cur v) + (setq pos 1) + (setq cnt (length val)) + (forge--msg nil nil nil "Pulling pullreq %s/%s" pos cnt) + (forge--fetch-pullreq-posts repo cur cb)) + ((not pos) + (forge--msg repo t t "Pulling REPO pullreqs") + (funcall callback val)) + ((not (assq 'source_project (car cur))) + (forge--fetch-pullreq-source-repo repo cur cb)) + ((not (assq 'target_project (car cur))) + (forge--fetch-pullreq-target-repo repo cur cb)) + ((setq cur (cdr cur)) + (cl-incf pos) + (forge--msg nil nil nil "Pulling pullreq %s/%s" pos cnt) + (forge--fetch-pullreq-posts repo cur cb)) + (t + (forge--msg repo t t "Pulling REPO pullreqs") + (funcall callback val))))))) (forge--msg repo t nil "Pulling REPO pullreqs") (forge--glab-get repo "/projects/:project/merge_requests" `((per_page . 100) (order_by . "updated_at") - ,@(and-let ((after (or since (oref repo pullreqs-until)))) - `((updated_after . ,after)))) + ,@(and$ (or since (oref repo pullreqs-until)) + `((updated_after . ,$)))) :unpaginate t - :callback (lambda (value _headers _status _req) - (funcall cb cb value))))) + :callback cb))) (cl-defmethod forge--fetch-pullreq-posts ((repo forge-gitlab-repository) cur cb) - (let-alist (car cur) - (forge--glab-get repo - (format "/projects/%s/merge_requests/%s/notes" .target_project_id .iid) - '((per_page . 100)) - :unpaginate t - :callback (lambda (value _headers _status _req) - (setf (alist-get 'notes (car cur)) value) - (funcall cb cb))))) + (forge--glab-get repo + (let-alist (car cur) + (format "/projects/%s/merge_requests/%s/notes" .target_project_id .iid)) + '((per_page . 100)) + :unpaginate t + :callback (lambda (value) + (setf (alist-get 'notes (car cur)) value) + (funcall cb)))) (cl-defmethod forge--fetch-pullreq-source-repo ((repo forge-gitlab-repository) cur cb) @@ -274,12 +272,12 @@ (forge--glab-get repo (format "/projects/%s" .source_project_id) nil :errorback (lambda (_err _headers _status _req) (setf (alist-get 'source_project (car cur)) nil) - (funcall cb cb)) - :callback (lambda (value _headers _status _req) + (funcall cb)) + :callback (lambda (value) (setf (alist-get 'source_project (car cur)) value) - (funcall cb cb))) + (funcall cb))) (setf (alist-get 'source_project (car cur)) nil) - (funcall cb cb)))) + (funcall cb)))) (cl-defmethod forge--fetch-pullreq-target-repo ((repo forge-gitlab-repository) cur cb) @@ -287,10 +285,14 @@ (forge--glab-get repo (format "/projects/%s" .target_project_id) nil :errorback (lambda (_err _headers _status _req) (setf (alist-get 'target_project (car cur)) nil) - (funcall cb cb)) - :callback (lambda (value _headers _status _req) + (funcall cb)) + :callback (lambda (value) (setf (alist-get 'target_project (car cur)) value) - (funcall cb cb))))) + (funcall cb))))) + +(cl-defmethod forge--update-pullreqs ((repo forge-gitlab-repository) data) + (dolist (v data) + (forge--update-pullreq repo v))) (cl-defmethod forge--update-pullreq ((repo forge-gitlab-repository) data) (closql-with-transaction (forge-db) @@ -366,8 +368,7 @@ (forge--glab-get repo "/projects/:project/users" '((per_page . 100)) :unpaginate t - :callback (lambda (value _headers _status _req) - (funcall callback callback (cons 'assignees value))))) + :callback callback)) (cl-defmethod forge--update-assignees ((repo forge-gitlab-repository) data) (oset repo assignees @@ -388,8 +389,7 @@ '((per_page . 100) (simple . t)) :unpaginate t - :callback (lambda (value _headers _status _req) - (funcall callback callback (cons 'forks value))))) + :callback callback)) (cl-defmethod forge--update-forks ((repo forge-gitlab-repository) data) (oset repo forks @@ -409,8 +409,7 @@ (forge--glab-get repo "/projects/:project/labels" '((per_page . 100)) :unpaginate t - :callback (lambda (value _headers _status _req) - (funcall callback callback (cons 'labels value))))) + :callback callback)) (cl-defmethod forge--update-labels ((repo forge-gitlab-repository) data) (oset repo labels @@ -601,7 +600,7 @@ (cl-defmethod forge--fork-repository ((repo forge-gitlab-repository) fork _all) (with-slots (name apihost) repo (forge--glab-post repo "/projects/:project/fork" - (and (not (equal fork (ghub--username apihost 'gitlab))) + (and (not (equal fork (ghub--username repo))) `((namespace . ,fork))) :noerror t) (ghub-wait (format "/projects/%s%%2F%s" (string-replace "/" "%2F" fork) name) @@ -625,15 +624,15 @@ host callback errorback) (declare (indent defun)) (ghub-request "GET" (if obj (forge--format-resource obj resource) resource) - params - :forge 'gitlab - :host (or host (oref (forge-get-repository obj) apihost)) - :auth 'forge - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :callback callback - :errorback (or errorback (and callback t)))) + params + :forge 'gitlab + :host (or host (oref (forge-get-repository obj) apihost)) + :auth 'forge + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :callback callback + :errorback (or errorback (and callback t)))) (cl-defun forge--glab-put (obj resource &optional params @@ -642,15 +641,15 @@ host callback errorback) (declare (indent defun)) (ghub-request "PUT" (if obj (forge--format-resource obj resource) resource) - params - :forge 'gitlab - :host (or host (oref (forge-get-repository obj) apihost)) - :auth 'forge - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :callback callback - :errorback (or errorback (and callback t)))) + params + :forge 'gitlab + :host (or host (oref (forge-get-repository obj) apihost)) + :auth 'forge + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :callback callback + :errorback (or errorback (and callback t)))) (cl-defun forge--glab-post (obj resource &optional params @@ -659,15 +658,15 @@ host callback errorback) (declare (indent defun)) (ghub-request "POST" (forge--format-resource obj resource) - params - :forge 'gitlab - :host (or host (oref (forge-get-repository obj) apihost)) - :auth 'forge - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :callback callback - :errorback (or errorback (and callback t)))) + params + :forge 'gitlab + :host (or host (oref (forge-get-repository obj) apihost)) + :auth 'forge + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :callback callback + :errorback (or errorback (and callback t)))) (cl-defun forge--glab-delete (obj resource &optional params @@ -676,20 +675,21 @@ host callback errorback) (declare (indent defun)) (ghub-request "DELETE" (forge--format-resource obj resource) - params - :forge 'gitlab - :host (or host (oref (forge-get-repository obj) apihost)) - :auth 'forge - :query query :payload payload :headers headers - :silent silent :unpaginate unpaginate - :noerror noerror :reader reader - :callback callback - :errorback (or errorback (and callback t)))) + params + :forge 'gitlab + :host (or host (oref (forge-get-repository obj) apihost)) + :auth 'forge + :query query :payload payload :headers headers + :silent silent :unpaginate unpaginate + :noerror noerror :reader reader + :callback callback + :errorback (or errorback (and callback t)))) ;;; _ ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let") diff --git a/elpa/forge-20251201.1658/forge-gogs.el b/elpa/forge-20260423.1757/forge-gogs.el similarity index 97% rename from elpa/forge-20251201.1658/forge-gogs.el rename to elpa/forge-20260423.1757/forge-gogs.el index 4e71768c..800e9a6a 100644 --- a/elpa/forge-20251201.1658/forge-gogs.el +++ b/elpa/forge-20260423.1757/forge-gogs.el @@ -1,6 +1,6 @@ ;;; forge-gogs.el --- Gogs support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli diff --git a/elpa/forge-20251201.1658/forge-issue.el b/elpa/forge-20260423.1757/forge-issue.el similarity index 98% rename from elpa/forge-20251201.1658/forge-issue.el rename to elpa/forge-20260423.1757/forge-issue.el index d9ebe969..b9c7e4d7 100644 --- a/elpa/forge-20251201.1658/forge-issue.el +++ b/elpa/forge-20260423.1757/forge-issue.el @@ -1,6 +1,6 @@ ;;; forge-issue.el --- Issue support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -176,7 +176,8 @@ can be selected from the start." (forge--read-topic prompt #'forge-current-issue (forge--topics-spec :type 'issue :active t) - (forge--topics-spec :type 'issue :active nil :state nil))) + (forge--topics-spec :type 'issue :active nil + :state nil :limit nil))) (defun forge-read-open-issue (prompt) "Read an open issue with completion using PROMPT." @@ -225,6 +226,7 @@ and optional HEADING to change the section heading." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-notify.el b/elpa/forge-20260423.1757/forge-notify.el similarity index 90% rename from elpa/forge-20251201.1658/forge-notify.el rename to elpa/forge-20260423.1757/forge-notify.el index 3c30e70b..1ea0f3b3 100644 --- a/elpa/forge-20251201.1658/forge-notify.el +++ b/elpa/forge-20260423.1757/forge-notify.el @@ -1,6 +1,6 @@ ;;; forge-notify.el --- Notify support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -137,11 +137,11 @@ signal an error." (defun forge-notifications-buffer-desc () (let ((status forge-notifications-selection)) (cond - ((not (listp status)) - (format "%s notifications" (capitalize (symbol-name status)))) - ((seq-set-equal-p status '(unread pending)) "Inbox") - ((seq-set-equal-p status '(unread pending done)) "All notifications") - ((format "Notifications %s" status))))) + ((not (listp status)) + (format "%s notifications" (capitalize (symbol-name status)))) + ((seq-set-equal-p status '(unread pending)) "Inbox") + ((seq-set-equal-p status '(unread pending done)) "All notifications") + ((format "Notifications %s" status))))) (defvar forge-notifications-display-style 'flat) (defvar forge-notifications-selection '(unread pending)) @@ -273,24 +273,24 @@ signal an error." (let ((notifs (forge--ls-notifications forge-notifications-selection))) (magit-insert-section (notifications) (cond - ((not notifs) - (insert "(empty)\n")) - ((eq forge-notifications-display-style 'flat) - (magit-insert-section-body - (dolist (notif notifs) - (forge-insert-notification notif)) - (insert ?\n))) - ((pcase-dolist (`(,_ . ,notifs) - (seq-group-by (##oref % repository) notifs)) - (let ((repo (forge-get-repository (car notifs)))) - (magit-insert-section (forge-repo repo) - (magit-insert-heading - (concat (propertize (oref repo slug) 'font-lock-face 'bold) - (format " (%s)" (length notifs)))) - (magit-insert-section-body - (dolist (notif notifs) - (forge-insert-notification notif)) - (insert ?\n)))))))))) + ((not notifs) + (insert "(empty)\n")) + ((eq forge-notifications-display-style 'flat) + (magit-insert-section-body + (dolist (notif notifs) + (forge-insert-notification notif)) + (insert ?\n))) + ((pcase-dolist (`(,_ . ,notifs) + (seq-group-by (##oref % repository) notifs)) + (let ((repo (forge-get-repository (car notifs)))) + (magit-insert-section (forge-repo repo) + (magit-insert-heading + (concat (propertize (oref repo slug) 'font-lock-face 'bold) + (format " (%s)" (length notifs)))) + (magit-insert-section-body + (dolist (notif notifs) + (forge-insert-notification notif)) + (insert ?\n)))))))))) (defun forge-insert-notification (notif) (with-slots (type title url) notif @@ -323,6 +323,7 @@ signal an error." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let") diff --git a/elpa/forge-20251201.1658/forge-pkg.el b/elpa/forge-20260423.1757/forge-pkg.el similarity index 66% rename from elpa/forge-20251201.1658/forge-pkg.el rename to elpa/forge-20260423.1757/forge-pkg.el index d59e109e..b4744c06 100644 --- a/elpa/forge-20251201.1658/forge-pkg.el +++ b/elpa/forge-20260423.1757/forge-pkg.el @@ -1,21 +1,21 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "forge" "20251201.1658" +(define-package "forge" "20260423.1757" "Access Git forges from Magit." '((emacs "29.1") (compat "30.1") - (closql "2.3") + (closql "2.4") (cond-let "0.2") (emacsql "4.3") - (ghub "5.0") + (ghub "5.1") (llama "1.0") - (magit "4.4") - (markdown-mode "2.7") + (magit "4.5") + (markdown-mode "2.8") (seq "2.24") - (transient "0.10") + (transient "0.12") (yaml "1.2")) :url "https://github.com/magit/forge" - :commit "325dbcd6fff652e28787950bada2484241dd3365" - :revdesc "325dbcd6fff6" + :commit "3eff1dab171602db9d1b7cfb0e6e7014eac73665" + :revdesc "3eff1dab1716" :keywords '("git" "tools" "vc") :authors '(("Jonas Bernoulli" . "emacs.forge@jonas.bernoulli.dev")) :maintainers '(("Jonas Bernoulli" . "emacs.forge@jonas.bernoulli.dev"))) diff --git a/elpa/forge-20251201.1658/forge-post.el b/elpa/forge-20260423.1757/forge-post.el similarity index 99% rename from elpa/forge-20251201.1658/forge-post.el rename to elpa/forge-20260423.1757/forge-post.el index aef62819..0550db96 100644 --- a/elpa/forge-20251201.1658/forge-post.el +++ b/elpa/forge-20260423.1757/forge-post.el @@ -1,6 +1,6 @@ ;;; forge-post.el --- Post support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -285,7 +285,7 @@ Insert the value of `branch.BRANCH.description' of the source BRANCH." (if (buffer-live-p prevbuf) prevbuf (current-buffer)) (if (or (not full-pull) (oref repo selective-p)) - (forge--pull-topic repo topic) + (forge--pull-topic repo (or topic (alist-get 'number value))) (forge--pull repo)))))) (defun forge--post-submit-errorback () @@ -408,6 +408,7 @@ Insert the value of `branch.BRANCH.description' of the source BRANCH." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let") diff --git a/elpa/forge-20251201.1658/forge-pullreq.el b/elpa/forge-20260423.1757/forge-pullreq.el similarity index 98% rename from elpa/forge-20251201.1658/forge-pullreq.el rename to elpa/forge-20260423.1757/forge-pullreq.el index 630d1cd7..d465eee1 100644 --- a/elpa/forge-20251201.1658/forge-pullreq.el +++ b/elpa/forge-20260423.1757/forge-pullreq.el @@ -1,6 +1,6 @@ ;;; forge-pullreq.el --- Pullreq support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -211,7 +211,8 @@ can be selected from the start." (forge--read-topic prompt #'forge-current-pullreq (forge--topics-spec :type 'pullreq :active t) - (forge--topics-spec :type 'pullreq :active nil :state nil))) + (forge--topics-spec :type 'pullreq :active nil + :state nil :limit nil))) ;;; Utilities @@ -299,6 +300,7 @@ and optional HEADING to change the section heading." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-repo.el b/elpa/forge-20260423.1757/forge-repo.el similarity index 98% rename from elpa/forge-20251201.1658/forge-repo.el rename to elpa/forge-20260423.1757/forge-repo.el index 9667a144..81b576a1 100644 --- a/elpa/forge-20251201.1658/forge-repo.el +++ b/elpa/forge-20260423.1757/forge-repo.el @@ -1,6 +1,6 @@ ;;; forge-repo.el --- Repository support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -180,8 +180,7 @@ or signal an error, depending on DEMAND." $ "that remote does not exist."))) ((magit-list-remotes) "Cannot decide on remote to use.") (t "No remote configured.")) - "https://docs.magit.vc/forge/How-Forge-Detection-Works.html" - )))))) + "https://docs.magit.vc/forge/How-Forge-Detection-Works.html")))))) (cl-defmethod forge-get-repository ((url string) &optional remote demand) "Return the repository at URL." @@ -519,8 +518,11 @@ forges and hosts." (unless (forge-repository-equal (forge-get-repository :stub?) repo) (when-let ((worktree (forge-get-worktree repo))) (setq default-directory worktree))) - (cl-call-next-method (oref repo apihost) - (forge--ghub-type-symbol (eieio-object-class repo))))) + (with-slots (apihost) repo + (cl-call-next-method + (caddr (car (cl-member apihost forge-alist :test #'equal :key #'cadr))) + (forge--ghub-type-symbol (eieio-object-class repo)) + apihost)))) (defun forge--ghub-type-symbol (class) (pcase-exhaustive class @@ -535,6 +537,7 @@ forges and hosts." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let") diff --git a/elpa/forge-20251201.1658/forge-repos.el b/elpa/forge-20260423.1757/forge-repos.el similarity index 98% rename from elpa/forge-20251201.1658/forge-repos.el rename to elpa/forge-20260423.1757/forge-repos.el index 6d4b1ce9..a11c8d7f 100644 --- a/elpa/forge-20251201.1658/forge-repos.el +++ b/elpa/forge-20260423.1757/forge-repos.el @@ -1,6 +1,6 @@ ;;; forge-repos.el --- List repositories -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -191,6 +191,7 @@ Only Github is supported for now." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-revnote.el b/elpa/forge-20260423.1757/forge-revnote.el similarity index 95% rename from elpa/forge-20251201.1658/forge-revnote.el rename to elpa/forge-20260423.1757/forge-revnote.el index 673b411d..67962e50 100644 --- a/elpa/forge-20251201.1658/forge-revnote.el +++ b/elpa/forge-20260423.1757/forge-revnote.el @@ -1,6 +1,6 @@ ;;; forge-revnote.el --- Revnote support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -46,6 +46,7 @@ ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-semi.el b/elpa/forge-20260423.1757/forge-semi.el similarity index 99% rename from elpa/forge-20251201.1658/forge-semi.el rename to elpa/forge-20260423.1757/forge-semi.el index f34a6181..9c3c7b47 100644 --- a/elpa/forge-20251201.1658/forge-semi.el +++ b/elpa/forge-20260423.1757/forge-semi.el @@ -1,6 +1,6 @@ ;;; forge-semi.el --- Support for semi-forges -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli diff --git a/elpa/forge-20251201.1658/forge-tablist.el b/elpa/forge-20260423.1757/forge-tablist.el similarity index 85% rename from elpa/forge-20251201.1658/forge-tablist.el rename to elpa/forge-20260423.1757/forge-tablist.el index 2cc25b21..90f6925f 100644 --- a/elpa/forge-20251201.1658/forge-tablist.el +++ b/elpa/forge-20260423.1757/forge-tablist.el @@ -1,6 +1,6 @@ ;;; forge-tablist.el --- Tabulated-list interface -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -64,12 +64,12 @@ (vconcat (mapcar (pcase-lambda (`(,_name ,get ,_width ,_sort ,_props)) (let ((val (cond - ((functionp get) - (funcall get obj)) - ((eq (car-safe get) 'repository) - (eieio-oref (forge-get-repository obj) - (cadr get))) - ((eieio-oref obj get))))) + ((functionp get) + (funcall get obj)) + ((eq (car-safe get) 'repository) + (eieio-oref (forge-get-repository obj) + (cadr get))) + ((eieio-oref obj get))))) (cond ((stringp val) val) ((null val) "") ((format "%s" val))))) @@ -80,6 +80,7 @@ ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let")) diff --git a/elpa/forge-20251201.1658/forge-topic.el b/elpa/forge-20260423.1757/forge-topic.el similarity index 93% rename from elpa/forge-20251201.1658/forge-topic.el rename to elpa/forge-20260423.1757/forge-topic.el index 69a292ab..92699811 100644 --- a/elpa/forge-20251201.1658/forge-topic.el +++ b/elpa/forge-20260423.1757/forge-topic.el @@ -1,6 +1,6 @@ ;;; forge-topic.el --- Topics support -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -675,16 +675,16 @@ Limit list to topics for which a review by the given user was requested." (and ,@(and (not global) repo `((= topic:repository ,(oref repo id)))) ,@(cond - ((and active state status) - `((or (in topic:state ,(vconcat (ensure-list state))) - (in topic:status ,(vconcat (ensure-list status)))))) - (`(,@(and state `((in topic:state ,(vconcat (ensure-list state))))) - ,@(and status `((in topic:status ,(vconcat (ensure-list status)))))))) + ((and active state status) + `((or (in topic:state ,(vconcat (ensure-list state))) + (in topic:status ,(vconcat (ensure-list status)))))) + (`(,@(and state `((in topic:state ,(vconcat (ensure-list state))))) + ,@(and status `((in topic:status ,(vconcat (ensure-list status)))))))) ,@(pcase type - ((and 'discussion (guard category)) - '((= topic:category discussion-category:id))) - ((and (or 'issue 'pullreq) (guard milestone)) - '((= topic:milestone milestone:id)))) + ((and 'discussion (guard category)) + '((= topic:category discussion-category:id))) + ((and (or 'issue 'pullreq) (guard milestone)) + '((= topic:milestone milestone:id)))) ,@(and labels `((or ,@(mapcar (##`(= label:name ,%)) labels)))) ,@(and marks `((or ,@(mapcar (##`(= mark:name ,%)) marks)))) ,@(and saved '((= topic:saved-p 't))) @@ -717,7 +717,8 @@ can be selected from the start." (forge--read-topic prompt #'forge-current-topic (forge--topics-spec :type 'topic :active t) - (forge--topics-spec :type 'topic :active nil :state nil))) + (forge--topics-spec :type 'topic :active nil + :state nil :limit nil))) (defun forge--read-topic (prompt current active all) (let* ((current (funcall current)) @@ -742,20 +743,25 @@ can be selected from the start." (current-local-map)))) (magit-completing-read (substitute-command-keys - (format "%s \\<%s> (\\[%s] for all)" prompt + (format "%s (\\<%s>\\[%s] for all)" prompt 'forge-read-topic-minibuffer-map 'forge-read-topic-lift-limit)) (completion-table-dynamic (let (all-choices) (lambda (_string) - (cond - (all-choices) - (forge-limit-topic-choices choices) - (t - (forge--replace-minibuffer-prompt (concat prompt ": ")) - (setq alist (forge--topic-collection - (forge--list-topics all repo))) - (setq all-choices (mapcar #'car alist))))))) + ;; For other frameworks, the minibuffer is current + ;; when this function is called, but for Helm we + ;; have to make it so. Starting with Helm commit + ;; 5e7c8498, this isn't necessary anymore. See + ;; https://github.com/emacs-helm/helm/issues/2744. + (with-selected-window (minibuffer-window) + (cond + (all-choices) + (forge-limit-topic-choices choices) + (t + (setq alist (forge--topic-collection + (forge--list-topics all repo))) + (setq all-choices (mapcar #'car alist)))))))) nil t nil nil default)) (magit-completing-read prompt choices nil t nil nil default)))) (cdr (assoc choice alist)))) @@ -774,31 +780,26 @@ can be selected from the start." (when (and (minibufferp) forge-limit-topic-choices) (setq-local forge-limit-topic-choices nil) - (when (and (bound-and-true-p vertico-mode) - (boundp 'vertico--input) - (fboundp 'vertico--exhibit)) - (setq vertico--input t) - (vertico--exhibit)))) - -(defun forge--replace-minibuffer-prompt (prompt) - (save-excursion - (goto-char (point-min)) - (let ((inhibit-read-only t) - (end (length prompt))) - ;; (insert-and-inherit prompt) would discard all faces already - ;; present in PROMPT, so instead we do it like `read_minibuf'. - (put-text-property 0 end 'front-sticky t prompt) - (put-text-property 0 end 'rear-nonsticky t prompt) - (put-text-property 0 end 'field t prompt) - (let ((props minibuffer-prompt-properties)) - (while props - (let ((key (pop props)) - (val (pop props))) - (if (eq key 'face) - (add-face-text-property 0 end val t prompt) - (put-text-property 0 end key val prompt))))) - (insert prompt) - (delete-region (point) (minibuffer-prompt-end))))) + (cond + ((and (bound-and-true-p vertico-mode) + (boundp 'vertico--input) + (fboundp 'vertico--exhibit)) + (setq vertico--input t) + (vertico--exhibit)) + ((and (bound-and-true-p helm-mode) + (fboundp 'helm-force-update)) + (helm-force-update)) + ((minibuffer-completion-help (minibuffer--completion-prompt-end) + (point-max)))) + (forge-read-topic--remove-prompt-hint))) + +(defun forge-read-topic--remove-prompt-hint () + (when (minibufferp) + (save-excursion + (goto-char (point-min)) + (when (re-search-forward " (.+? for all)" (minibuffer-prompt-end) t) + (let ((inhibit-read-only t)) + (replace-match "")))))) (defun forge-topic-completion-at-point () (let ((bol (line-beginning-position)) @@ -1000,23 +1001,23 @@ can be selected from the start." (and-let* ((local t) (labels (cond - ((eieio-object-p arg) - (oref arg labels)) - ((forge-buffer-repository) - (forge-sql-cdr `[:select label:* :from label :where - ,(if arg - '(and (= repository $s1) - (in name $v2)) - '(= repository $s1)) - :order-by [(asc name)]] - forge-buffer-repository - (vconcat arg))) - (t - (setq local nil) - (forge-sql `[:select :distinct name :from label - ,@(and arg '(:where (in name $v1))) - :order-by [(asc name)]] - (vconcat arg))))) + ((eieio-object-p arg) + (oref arg labels)) + ((forge-buffer-repository) + (forge-sql-cdr `[:select label:* :from label :where + ,(if arg + '(and (= repository $s1) + (in name $v2)) + '(= repository $s1)) + :order-by [(asc name)]] + forge-buffer-repository + (vconcat arg))) + (t + (setq local nil) + (forge-sql `[:select :distinct name :from label + ,@(and arg '(:where (in name $v1))) + :order-by [(asc name)]] + (vconcat arg))))) (format (if local (pcase-lambda (`(,_id ,name ,color ,_description)) (let* ((background (forge--sanitize-color color)) @@ -1447,12 +1448,12 @@ This mode itself is never used directly." (magit-insert-section (,(intern (format "topic-%s" name))) (insert ,(capitalize (string-pad (format "%s: " name) 11))) ,(cond - (insert - `(unless (funcall ,insert topic) - (insert (magit--propertize-face "none" 'magit-dimmed)))) - (format - `(insert (or (funcall ,format topic) - (magit--propertize-face "none" 'magit-dimmed))))) + (insert + `(unless (funcall ,insert topic) + (insert (magit--propertize-face "none" 'magit-dimmed)))) + (format + `(insert (or (funcall ,format topic) + (magit--propertize-face "none" 'magit-dimmed))))) (insert ?\n))) ,@(and (if command? command t) `((defvar-keymap ,map " " @@ -1509,7 +1510,13 @@ This mode itself is never used directly." ("l n" "notifications" forge-list-notifications) ("l g" "global topics" forge-list-global-topics) ("l t" "topics" forge-list-topics) - ""]) + "" + ( :info "Batch" :format "%d" :face transient-heading + :if (##memq (oref transient--prefix command) + '(forge-topic-menu forge-topics-menu))) + ( "C" "done with closed" forge-mark-completed-topics-as-done + :if (##memq (oref transient--prefix command) + '(forge-topic-menu forge-topics-menu)))]) (transient-define-group forge--topic-menus-group ["Menu" @@ -1570,8 +1577,9 @@ This mode itself is never used directly." ;;;; Menus ;;;###autoload(autoload 'forge-topic-menu "forge-topic" nil t) -(transient-define-prefix forge-topic-menu () - "Edit the topic at point." +(transient-define-prefix forge-topic-menu (&optional visit) + "Show menu for the topic at point. +With prefix argument VISIT, also visit the topic." :transient-suffix t :transient-non-suffix #'transient--do-call :transient-switch-frame nil @@ -1605,7 +1613,11 @@ This mode itself is never used directly." ("-A" forge-discussion-set-answer) """Display" ("-H" forge-toggle-topic-legend)]] - [forge--topic-legend-group]) + [forge--topic-legend-group] + (interactive (list current-prefix-arg)) + (when visit + (forge-topic-setup-buffer (forge-topic-at-point))) + (transient-setup 'forge-topic-menu)) (transient-augment-suffix forge-topic-menu :transient #'transient--do-replace @@ -1782,6 +1794,33 @@ inferior process." "Set the notification status of the current topic to `done'." :class 'forge--topic-set-status-command :status 'done) +(defun forge-mark-completed-topics-as-done () + "Mark completed topics of the current repository as done. +Change the private status to \"done\" for topics whose private status is +\"unread\" or \"pending\" and whose public state is \"completed\". +Whether this affects all such topics or only all such topics of a +certain type (discussion, issue or pull-request), depends on the +context." + (interactive) + (let* ((type (forge-current-topic-type)) + (desc (if (eq type 'pullreq) 'pull-request type)) + (topics (forge--list-topics + (forge--topics-spec :type type + :active nil + :state 'closed + :status 'inbox) + (forge-get-repository :tracked)))) + (cond ((not topics) + (message "No completed %s that could be marked as done" desc)) + ((magit-confirm t + "Mark \"%s\" as done" + (format "Mark %%d %ss as done" desc) + nil + (mapcar #'forge--format-topic-line topics)) + (dolist (topic topics) + (oset topic status 'done)) + (forge-refresh-buffer))))) + ;;;; Set (defclass forge--topic-set-slot-command (transient-suffix) @@ -1792,8 +1831,8 @@ inferior process." (definition :initform (lambda (value) (interactive - (list (funcall (oref (transient-suffix-object) reader) - (forge-current-topic t)))) + (list (funcall (oref (transient-suffix-object) reader) + (forge-current-topic t)))) (let ((topic (forge-current-topic t))) (funcall (oref (transient-suffix-object) setter) (forge-get-repository topic) @@ -2089,6 +2128,7 @@ modify `bug-reference-bug-regexp' if appropriate." ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let") diff --git a/elpa/forge-20251201.1658/forge-topics.el b/elpa/forge-20260423.1757/forge-topics.el similarity index 96% rename from elpa/forge-20251201.1658/forge-topics.el rename to elpa/forge-20260423.1757/forge-topics.el index 14f225a0..dabd8845 100644 --- a/elpa/forge-20251201.1658/forge-topics.el +++ b/elpa/forge-20260423.1757/forge-topics.el @@ -1,6 +1,6 @@ ;;; forge-topics.el --- List topics -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli @@ -190,21 +190,21 @@ the Magit status buffer." (forge-get-repository :tracked?)))) (magit-insert-section (topicbuf) (cond - ((not topics) - (insert "No matching topics\n")) - ((not (oref forge--buffer-topics-spec grouped)) - (dolist (topic topics) - (forge--insert-topic topic 5))) - ((pcase-dolist (`(,_ . ,topics) - (seq-group-by (##oref % repository) topics)) - (let ((repo (forge-get-repository (car topics)))) - (magit-insert-section (forge-repo repo) - (magit-insert-heading - (concat (propertize (oref repo slug) - 'font-lock-face 'bold) - (format " (%s)" (length topics)))) - (dolist (topic topics) - (forge--insert-topic topic 5)))))))))) + ((not topics) + (insert "No matching topics\n")) + ((not (oref forge--buffer-topics-spec grouped)) + (dolist (topic topics) + (forge--insert-topic topic 5))) + ((pcase-dolist (`(,_ . ,topics) + (seq-group-by (##oref % repository) topics)) + (let ((repo (forge-get-repository (car topics)))) + (magit-insert-section (forge-repo repo) + (magit-insert-heading + (concat (propertize (oref repo slug) + 'font-lock-face 'bold) + (format " (%s)" (length topics)))) + (dolist (topic topics) + (forge--insert-topic topic 5)))))))))) (defun forge-topics-buffer-desc () (capitalize (concat (symbol-name (oref forge--buffer-topics-spec type)) "s"))) @@ -681,11 +681,11 @@ Expunged topics include: (propertize (format "%s" (oref forge--buffer-topics-spec order)) 'face 'bold))) (interactive - (list (magit-read-char-case "Order by: " t - (?n "[n]ewest" 'newest) - (?o "[o]ldest" 'oldest) - (?r "[r]ecently updated" 'recently-updated) - (?a "[a]nciently updated" 'anciently-updated)))) + (list (magit-read-char-case "Order by: " t + (?n "[n]ewest" 'newest) + (?o "[o]ldest" 'oldest) + (?r "[r]ecently updated" 'recently-updated) + (?a "[a]nciently updated" 'anciently-updated)))) (oset forge--buffer-topics-spec order order) (forge-refresh-buffer)) @@ -724,6 +724,7 @@ Expunged topics include: ;; Local Variables: ;; read-symbol-shorthands: ( ;; ("and$" . "cond-let--and$") +;; ("and>" . "cond-let--and>") ;; ("and-let" . "cond-let--and-let") ;; ("if-let" . "cond-let--if-let") ;; ("when-let" . "cond-let--when-let") diff --git a/elpa/forge-20251201.1658/forge.el b/elpa/forge-20260423.1757/forge.el similarity index 95% rename from elpa/forge-20251201.1658/forge.el rename to elpa/forge-20260423.1757/forge.el index 5d8da6d4..b079ac49 100644 --- a/elpa/forge-20251201.1658/forge.el +++ b/elpa/forge-20260423.1757/forge.el @@ -1,26 +1,26 @@ ;;; forge.el --- Access Git forges from Magit -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli ;; Homepage: https://github.com/magit/forge ;; Keywords: git tools vc -;; Package-Version: 20251201.1658 -;; Package-Revision: 325dbcd6fff6 +;; Package-Version: 20260423.1757 +;; Package-Revision: 3eff1dab1716 ;; Package-Requires: ( ;; (emacs "29.1") ;; (compat "30.1") -;; (closql "2.3") +;; (closql "2.4") ;; (cond-let "0.2") ;; (emacsql "4.3") -;; (ghub "5.0") +;; (ghub "5.1") ;; (llama "1.0") -;; (magit "4.4") -;; (markdown-mode "2.7") +;; (magit "4.5") +;; (markdown-mode "2.8") ;; (seq "2.24") -;; (transient "0.10") +;; (transient "0.12") ;; (yaml "1.2")) ;; SPDX-License-Identifier: GPL-3.0-or-later @@ -165,7 +165,7 @@ is loaded, then `magit-mode-map' ends up being modified anyway.") (defconst forge--minimal-git "2.25.0") (defun forge-startup-asserts () - (let ((version (magit-git-version))) + (let ((version (ignore-errors (magit-git-version)))) (when (and version (version< version forge--minimal-git)) (display-warning 'magit (format "\ Forge requires Git >= %s, you are using %s. diff --git a/elpa/forge-20251201.1658/forge.info b/elpa/forge-20260423.1757/forge.info similarity index 98% rename from elpa/forge-20251201.1658/forge.info rename to elpa/forge-20260423.1757/forge.info index abe7b175..4a3de7c4 100644 --- a/elpa/forge-20251201.1658/forge.info +++ b/elpa/forge-20260423.1757/forge.info @@ -1,6 +1,6 @@ This is forge.info, produced by makeinfo version 6.8 from forge.texi. - Copyright (C) 2018-2025 Jonas Bernoulli + Copyright (C) 2018-2026 Jonas Bernoulli You can redistribute this document and/or modify it under the terms @@ -27,9 +27,9 @@ Forge User and Developer Manual Forge allows you to work with Git forges, currently Github and Gitlab, from the comfort of Magit and Emacs. -This manual is for Forge version 0.6.2. +This manual is for Forge version 0.6.4. - Copyright (C) 2018-2025 Jonas Bernoulli + Copyright (C) 2018-2026 Jonas Bernoulli You can redistribute this document and/or modify it under the terms @@ -1014,6 +1014,8 @@ has to be visited in its own buffer. labels to it. Additionally it features a few commands that act on that topic. + With a prefix argument, this additionally visits the topic. + Details about a topic, such as its status and labels, can alternatively be edited by visiting the topic in its own buffer, navigating to the header that displays the detail and then typing ‘C-c @@ -1995,44 +1997,44 @@ Ref: Topic sections in Magit status buffers32920 Node: Visiting Topics34289 Node: Creating Topics and Posts37648 Node: Editing Topics39730 -Node: Pulling41355 -Node: Branching43523 -Node: Miscellaneous Commands49418 -Node: Miscellaneous Options53521 -Node: How Forge Detection Works55985 -Node: Supported Forges and Hosts61522 -Node: Supported Forges62831 -Ref: Github62987 -Ref: Github Caveats63142 -Ref: Github Hosts63804 -Ref: Gitlab63876 -Ref: Gitlab Caveats63903 -Ref: Gitlab Hosts64044 -Node: Partially Supported Forges64180 -Ref: Forgejo https//forgejoorg64386 -Ref: Forgejo Hosts64508 -Ref: Gitea https//giteaio64584 -Ref: Gogs https//gogsio64808 -Ref: Bitbucket https//bitbucketorg65048 -Ref: Bitbucket Caveats65258 -Ref: Bitbucket Hosts66171 -Node: Supported Semi-Forges66252 -Ref: Gitweb https//git-scmcom/docs/gitweb66423 -Ref: Gitweb Caveats66514 -Ref: Cgit https//gitzx2c4com/cgit/about66770 -Ref: Cgit Caveats66859 -Ref: Cgit Hosts67224 -Ref: Stgit https//codemadnessorg/git/stagit/file/READMEhtml67367 -Ref: Stgit Caveats67496 -Ref: Stgit Hosts67798 -Ref: Srht https//metasrht67874 -Ref: Srht Caveats67935 -Ref: Srht Hosts68234 -Node: FAQ68301 -Node: error in process filter HTTP Error 502 "Bad gateway"68711 -Node: Keystroke Index70192 -Node: Function and Command Index76245 -Node: Variable Index82744 +Node: Pulling41421 +Node: Branching43589 +Node: Miscellaneous Commands49484 +Node: Miscellaneous Options53587 +Node: How Forge Detection Works56051 +Node: Supported Forges and Hosts61588 +Node: Supported Forges62897 +Ref: Github63053 +Ref: Github Caveats63208 +Ref: Github Hosts63870 +Ref: Gitlab63942 +Ref: Gitlab Caveats63969 +Ref: Gitlab Hosts64110 +Node: Partially Supported Forges64246 +Ref: Forgejo https//forgejoorg64452 +Ref: Forgejo Hosts64574 +Ref: Gitea https//giteaio64650 +Ref: Gogs https//gogsio64874 +Ref: Bitbucket https//bitbucketorg65114 +Ref: Bitbucket Caveats65324 +Ref: Bitbucket Hosts66237 +Node: Supported Semi-Forges66318 +Ref: Gitweb https//git-scmcom/docs/gitweb66489 +Ref: Gitweb Caveats66580 +Ref: Cgit https//gitzx2c4com/cgit/about66836 +Ref: Cgit Caveats66925 +Ref: Cgit Hosts67290 +Ref: Stgit https//codemadnessorg/git/stagit/file/READMEhtml67433 +Ref: Stgit Caveats67562 +Ref: Stgit Hosts67864 +Ref: Srht https//metasrht67940 +Ref: Srht Caveats68001 +Ref: Srht Hosts68300 +Node: FAQ68367 +Node: error in process filter HTTP Error 502 "Bad gateway"68777 +Node: Keystroke Index70258 +Node: Function and Command Index76311 +Node: Variable Index82810  End Tag Table -- 2.47.3