You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services/apps/packages_worker/src/deps-dev/queries/packageReposSql.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,9 @@ path_computed AS (
11
11
SELECT
12
12
pm.purl,
13
13
CASE pvp.ProjectType
14
-
WHEN 'GITHUB' THEN 'github.com'
15
-
WHEN 'GITLAB' THEN 'gitlab.com'
16
-
WHEN 'BITBUCKET' THEN 'bitbucket.org'
14
+
WHEN 'GITHUB' THEN 'github'
15
+
WHEN 'GITLAB' THEN 'gitlab'
16
+
WHEN 'BITBUCKET' THEN 'bitbucket'
17
17
END AS host,
18
18
CASE pvp.ProjectType
19
19
WHEN 'GITHUB' THEN LOWER(
@@ -40,7 +40,7 @@ path_computed AS (
40
40
)
41
41
SELECT
42
42
purl,
43
-
CONCAT('https://', host, '/', path) AS canonical_url,
43
+
CONCAT('https://', CASE host WHEN 'github' THEN 'github.com' WHEN 'gitlab' THEN 'gitlab.com' WHEN 'bitbucket' THEN 'bitbucket.org' END, '/', path) AS canonical_url,
44
44
confidence
45
45
FROM path_computed
46
46
WHERE REGEXP_CONTAINS(path, r'^[a-zA-Z0-9._-]+/[a-zA-Z0-9._/-]+$')
Copy file name to clipboardExpand all lines: services/apps/packages_worker/src/deps-dev/queries/reposSql.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ WITH raw AS (
5
5
p.Type AS raw_project_type,
6
6
p.Name AS raw_project_name,
7
7
CASE p.Type
8
-
WHEN 'GITHUB' THEN 'github.com'
9
-
WHEN 'GITLAB' THEN 'gitlab.com'
10
-
WHEN 'BITBUCKET' THEN 'bitbucket.org'
8
+
WHEN 'GITHUB' THEN 'github'
9
+
WHEN 'GITLAB' THEN 'gitlab'
10
+
WHEN 'BITBUCKET' THEN 'bitbucket'
11
11
END AS host,
12
12
CASE p.Type
13
13
WHEN 'GITHUB' THEN LOWER(
@@ -32,7 +32,7 @@ WITH raw AS (
32
32
AND p.Type IN ('GITHUB', 'GITLAB', 'BITBUCKET')
33
33
)
34
34
SELECT
35
-
CONCAT('https://', host, '/', path) AS canonical_url,
35
+
CONCAT('https://', CASE raw_project_type WHEN 'GITHUB' THEN 'github.com' WHEN 'GITLAB' THEN 'gitlab.com' WHEN 'BITBUCKET' THEN 'bitbucket.org' END, '/', path) AS canonical_url,
0 commit comments