Function: forge-create-pullreq-insert-branch-description
forge-create-pullreq-insert-branch-description is a byte-compiled
function defined in forge-post.el.
Signature
(forge-create-pullreq-insert-branch-description)
Documentation
When creating a pull-request, insert branch description, if any.
Insert the value of branch.BRANCH.description of the source BRANCH.
Source Code
;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-post.el
(defun forge-create-pullreq-insert-branch-description ()
"When creating a pull-request, insert branch description, if any.
Insert the value of `branch.BRANCH.description' of the source BRANCH."
(when-let* ((source forge--buffer-head-branch)
(description (magit-get "branch"
(cdr (magit-split-branch-name source))
"description")))
(when (or (alist-get 'text forge--buffer-template)
(> (point-max) 3))
(goto-char (point-max))
(unless (eq (char-before) ?\n)
(insert ?\n))
(insert "\n<!-- Branch description: -->\n\n"))
(insert description)
(goto-char 3)))