Function: forge-merge

forge-merge is an autoloaded, interactive and byte-compiled function defined in forge-commands.el.

Signature

(forge-merge ARG1 ARG2)

Documentation

Merge the current pull-request using METHOD using the forge's API.

If there is no current pull-request or with a prefix argument, then read pull-request PULLREQ to visit instead.

Use of this command is discouraged. Unless the remote repository is configured to disallow that, you should instead merge locally and then push the target branch. Forges detect that you have done that and respond by automatically marking the pull-request as merged.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-commands.el
;;;###autoload(autoload 'forge-merge "forge-commands" nil t)
(transient-define-suffix forge-merge (pullreq method)
  "Merge the current pull-request using METHOD using the forge's API.

If there is no current pull-request or with a prefix argument,
then read pull-request PULLREQ to visit instead.

Use of this command is discouraged.  Unless the remote repository
is configured to disallow that, you should instead merge locally
and then push the target branch.  Forges detect that you have
done that and respond by automatically marking the pull-request
as merged."
  (declare (interactive-only nil))
  (interactive (list (forge-read-pullreq "Merge pull-request")
                     (forge-select-merge-method)))
  (let ((pullreq (forge-get-pullreq pullreq)))
    (forge--merge-pullreq (forge-get-repository pullreq)
                          pullreq
                          (magit-commit-oid
                           (forge--pullreq-branch-internal pullreq))
                          method)))