Function: forge--merge-pullreq

forge--merge-pullreq is a byte-compiled function defined in forge-github.el.

Signature

(forge--merge-pullreq ARG0 ARG &rest ARGS)

Implementations

(forge--merge-pullreq (REPO forge-gitlab-repository) (TOPIC forge-topic) HASH METHOD) in `forge-gitlab.el'.

Undocumented

(forge--merge-pullreq (REPO forge-github-repository) (TOPIC forge-pullreq) HASH METHOD) in `forge-github.el'.

Undocumented

Source Code

;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-github.el
(cl-defmethod forge--merge-pullreq
  ((repo  forge-github-repository)
   (topic forge-pullreq)
   hash method)
  (forge-mutate topic mergePullRequest
    ((pullRequestId (oref topic their-id))
     (mergeMethod (upcase (symbol-name method)))
     (and hash (expectedHeadOid hash)))
    :callback
    (lambda (_)
      (forge--pull
       repo
       (lambda ()
         (when-let* ((branch (or (forge--pullreq-branch-active topic)
                                 (forge--branch-pullreq topic)))
                     (upstream (magit-get-local-upstream-branch branch))
                     (remote (oref repo remote)))
           (magit-call-git "checkout" upstream)
           (magit-call-git "pull" "--ff-only" remote (magit-pull-arguments))
           (magit-call-git "branch" "-d" branch)
           (forge-refresh-buffer)))))))