feat(gs/emacs): Include repo in PR links
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
This commit is contained in:
		
							parent
							
								
									d358b81a10
								
							
						
					
					
						commit
						aa0b4e430c
					
				
					 1 changed files with 13 additions and 1 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue