@snapcommit/cli 3.8.22 → 3.8.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/github.js +3 -2
- package/package.json +1 -1
package/dist/lib/github.js
CHANGED
|
@@ -33,14 +33,15 @@ function getCurrentRepo() {
|
|
|
33
33
|
try {
|
|
34
34
|
const remote = (0, child_process_1.execSync)('git remote get-url origin', { encoding: 'utf-8' }).trim();
|
|
35
35
|
// Parse GitHub URL (supports both HTTPS and SSH)
|
|
36
|
+
// Updated regex to support dots, underscores, and other chars in repo names
|
|
36
37
|
let match;
|
|
37
38
|
if (remote.startsWith('https://')) {
|
|
38
39
|
// https://github.com/owner/repo.git
|
|
39
|
-
match = remote.match(/github\.com[/:]([\w-]+)\/([\w
|
|
40
|
+
match = remote.match(/github\.com[/:]([\w-]+)\/([\w.-]+?)(\.git)?$/);
|
|
40
41
|
}
|
|
41
42
|
else {
|
|
42
43
|
// git@github.com:owner/repo.git
|
|
43
|
-
match = remote.match(/github\.com[/:]([\w-]+)\/([\w
|
|
44
|
+
match = remote.match(/github\.com[/:]([\w-]+)\/([\w.-]+?)(\.git)?$/);
|
|
44
45
|
}
|
|
45
46
|
if (match) {
|
|
46
47
|
return {
|