Skip to content

Commit 128c974

Browse files
authored
Resolve usernames when the remote ends with a trailing slash
1 parent b1f0991 commit 128c974

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cherry_picker/cherry_picker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def username(self):
196196
cmd = ["git", "config", "--get", f"remote.{self.pr_remote}.url"]
197197
result = self.run_cmd(cmd, required_real_result=True)
198198
# implicit ssh URIs use : to separate host from user, others just use /
199-
username = result.replace(":", "/").split("/")[-2]
199+
username = result.replace(":", "/").removesuffix("/").split("/")[-2]
200200
return username
201201

202202
def get_cherry_pick_branch(self, maint_branch):

0 commit comments

Comments
 (0)