Skip to content

Commit

Permalink
Case insensitive username lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw authored Mar 20, 2024
1 parent 3faf263 commit 3ebb6e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clickhouse/github-public-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ with public_events as (
'Private repo made public' as action,
repo_name
from github_events
where actor_login = 'simonw'
where lower(actor_login) = 'simonw'
and event_type in ('PublicEvent')
),
most_recent_public_push as (
Expand All @@ -35,7 +35,7 @@ most_recent_public_push as (
repo_name
from github_events
where event_type = 'PushEvent'
and actor_login = 'simonw'
and lower(actor_login) = 'simonw'
group by repo_name
),
combined as (
Expand Down Expand Up @@ -77,7 +77,7 @@ results = username.trim() &&
'Private repo made public' as action,
repo_name
from github_events
where actor_login = '${username.trim()}'
where lower(actor_login) = '${username.trim().toLowerCase()}'
and event_type in ('PublicEvent')
),
most_recent_public_push as (
Expand All @@ -87,7 +87,7 @@ most_recent_public_push as (
repo_name
from github_events
where event_type = 'PushEvent'
and actor_login = '${username.trim()}'
and lower(actor_login) = '${username.trim()}.toLowerCase()'
group by repo_name
),
combined as (
Expand Down

0 comments on commit 3ebb6e0

Please sign in to comment.