@faable/faable 1.5.17-next.22 → 1.5.17-next.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.
|
@@ -7,7 +7,15 @@ import { Configuration } from '../../lib/Configuration.js';
|
|
|
7
7
|
const getGitRemoteUrl = async (workdir) => {
|
|
8
8
|
try {
|
|
9
9
|
const { stdout } = await cmd("git remote get-url origin", { cwd: workdir });
|
|
10
|
-
|
|
10
|
+
const url = stdout?.toString().trim();
|
|
11
|
+
if (!url)
|
|
12
|
+
return undefined;
|
|
13
|
+
// Extract org/repo from github urls
|
|
14
|
+
const match = url.match(/github\.com[:/]([^/]+\/[^/]+?)(?:\.git)?$/);
|
|
15
|
+
if (match) {
|
|
16
|
+
return match[1];
|
|
17
|
+
}
|
|
18
|
+
return url;
|
|
11
19
|
}
|
|
12
20
|
catch (error) {
|
|
13
21
|
log.warn("Could not detect git remote origin URL.");
|