Greg Hogan <c...@greghogan.com> writes:

[...]
> git push civodul HEAD:refs/for/master/$(git branch --show-current) \
>   -o title="$(git log -1 --pretty=format:'%s')" \
>   -o description="$(git log -1 --pretty=format:'%b' | awk 1 ORS='<br />')"
>
> [0] https://codeberg.org/civodul/guix/pulls/12
>


For Emacs users, maybe we can create a custom #'string-edit to provide a
description in an appropriate format.

Was playing with this:

  (defun thanos/forgejo-pr-submit (title topic &optional branch)
      (interactive (list (read-string "PR Title: ")
                         (read-string "Topic: ")))
      (let* ((branch (or branch "master"))
             (desc (read-string-from-buffer "PR Description" ""))
             (git (executable-find "git")))
        (unless git
          (error "Git path not found"))
        (async-shell-command
         (format
          "%s push origin HEAD:refs/for/%s -o topic=\"%s\" -o title=\"%s\" -o 
description=\"%s\""
          git branch topic title desc)
         "*forgejo PR*")))


-- 
Thanos Apollo ☧
https://thanosapollo.org

Attachment: signature.asc
Description: PGP signature

Reply via email to