diff options
| author | Thanos Apollo <public@thanosapollo.org> | 2026-04-27 03:08:44 +0300 |
|---|---|---|
| committer | Thanos Apollo <public@thanosapollo.org> | 2026-04-27 03:08:44 +0300 |
| commit | de750a3a98bba188c9da3ab2bad4a8db0670053b (patch) | |
| tree | a17efbba540a30a2500776afa1667085bffb6d2b | |
| parent | 049a6e647a306fcb264f6dd760d2d8262f24fd26 (diff) | |
utls: create-repo: Add ssh url to kill ring.
| -rw-r--r-- | lisp/forgejo-utils.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/forgejo-utils.el b/lisp/forgejo-utils.el index 43ee22f..f11d568 100644 --- a/lisp/forgejo-utils.el +++ b/lisp/forgejo-utils.el @@ -313,12 +313,16 @@ Fetches templates if available, lets user pick one, then compose." ;;; Repository creation (defun forgejo-utils-create-repo (host-url name) - "Create a new public repository named NAME on HOST-URL." + "Create a new public repository named NAME on HOST-URL. +Copies the SSH clone URL to the kill ring on success." (forgejo-api-post host-url "user/repos" nil `((name . ,name)) - (lambda (_data _headers) - (message "Repository created: %s" name)))) + (lambda (data _headers) + (let ((ssh-url (alist-get 'ssh_url data))) + (when ssh-url (kill-new ssh-url)) + (message "Repository created: %s %s" name + (if ssh-url (concat "(copied: " ssh-url ")") "")))))) ;;; Label creation |
