We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3c5540 commit 0ef37e3Copy full SHA for 0ef37e3
1 file changed
src/run/helpers/parse_git_remote.rs
@@ -3,7 +3,7 @@ use lazy_static::lazy_static;
3
4
lazy_static! {
5
static ref REMOTE_REGEX: regex::Regex = regex::Regex::new(
6
- r"(?P<domain>[^/@\.]+\.\w+)[:/](?P<owner>[^/]+)/(?P<repository>[^/]+?)(\.git)?$"
+ r"(?P<domain>[^/@\.]+\.\w+)[:/](?P<owner>[^/]+)/(?P<repository>[^/]+?)(\.git)?/?$"
7
)
8
.unwrap();
9
}
@@ -89,5 +89,15 @@ mod tests {
89
repository: "runner",
90
91
"###);
92
+
93
+ let remote = "https://github.com/codspeed/runner/";
94
+ let git_remote = parse_git_remote(remote).unwrap();
95
+ insta::assert_debug_snapshot!(git_remote, @r###"
96
+ GitRemote {
97
+ domain: "github.com",
98
+ owner: "codspeed",
99
+ repository: "runner",
100
+ }
101
+ "###);
102
103
0 commit comments