diff options
author | Griffin Smith <grfn@gws.fyi> | 2020-10-26T17·31-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2020-10-27T20·55+0000 |
commit | aa0b4e430cff61d86706ca31c6aca2cbd4b276aa (patch) | |
tree | 22d07656ac2745046085fdaa9e430c8b8fa15c2a /users | |
parent | d358b81a10af7ecdd78c35b535c5805b356a5778 (diff) |
feat(gs/emacs): Include repo in PR links r/1862
When posting a link to a PR created during an org headline, include the name of the repository the PR was opened to in the link text. Change-Id: I6c564aee3b098d3c6f96c7d7d609aa2638bc98e1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2063 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to '')
-rw-r--r-- | users/glittershark/emacs.d/org-config.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/users/glittershark/emacs.d/org-config.el b/users/glittershark/emacs.d/org-config.el index 651582d06d4d..9ca5746ed8a7 100644 --- a/users/glittershark/emacs.d/org-config.el +++ b/users/glittershark/emacs.d/org-config.el @@ -155,7 +155,19 @@ (number (alist-get 'number value))) (org-set-property "pull-request" - (org-make-link-string url (number-to-string number))))))))) + (org-make-link-string + url + (format "%s/%s/%d" + (->> value + (alist-get 'base) + (alist-get 'repo) + (alist-get 'name)) + (->> value + (alist-get 'base) + (alist-get 'repo) + (alist-get 'owner) + (alist-get 'login)) + number))))))))) (advice-add #'forge--post-submit-callback |