this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

✨ Support SSH origins (Closes #14)

+13 -5
+6
CHANGELOG.md
··· 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 7 8 + ## [Unreleased] 9 + 10 + ### Added 11 + 12 + - support for ssh remotes 13 + 8 14 ## [0.4.1] - 2024-01-02 9 15 10 16 ### Added
+7 -5
issurge/parser.py
··· 104 104 105 105 def _get_remote_url(self): 106 106 try: 107 - return urlparse( 108 - subprocess.run( 109 - ["git", "remote", "get-url", "origin"], capture_output=True 110 - ).stdout.decode() 111 - ) 107 + origin = subprocess.run( 108 + ["git", "remote", "get-url", "origin"], capture_output=True 109 + ).stdout.decode() 110 + # fake an HTTPs URL from a SSH one 111 + if origin.startswith("git@"): 112 + origin = origin.replace(":", "/").replace("git@", "https://") 113 + return urlparse(origin) 112 114 except subprocess.CalledProcessError as e: 113 115 raise ValueError( 114 116 "Could not determine remote url, make sure that you are inside of a git repository that has a remote named 'origin'"