Skip to content

Commit

Permalink
Handle trailing slash (#1763)
Browse files Browse the repository at this point in the history
* Handle trailing slash

* Add comment
  • Loading branch information
ravenac95 authored Jul 11, 2024
1 parent 8efbf57 commit 4f4cb97
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ github_repos as (
inner join
{{ ref('stg_ossd__current_repositories') }} as repos
on
{#
We join on either the repo url or the user/org url.
The RTRIMs are to ensure we match even if there are trailing slashes
#}
LOWER(CONCAT("https://github.com/", repos.owner))
= LOWER(JSON_VALUE(github.url))
or LOWER(repos.url) = LOWER(JSON_VALUE(github.url))
= LOWER(RTRIM(JSON_VALUE(github.url), "/"))
or LOWER(repos.url) = LOWER(RTRIM(JSON_VALUE(github.url), "/"))
),

all_npm_raw as (
Expand Down

0 comments on commit 4f4cb97

Please sign in to comment.