Last active
January 5, 2022 22:28
-
-
Save judell/ce6a4512db0e43c5244137484422a1de to your computer and use it in GitHub Desktop.
summarize github issues where i am author/assignee/mention or a commenter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create materialized view my_github_activity as ( | |
with my_created_issues as ( | |
select | |
* | |
from | |
github_search_issue | |
where | |
query = 'is:issue author:judell' | |
and html_url ~ 'turbot' | |
), | |
my_assigned_issues as ( | |
select | |
* | |
from | |
github_search_issue | |
where | |
query = 'is:issue assignee:judell' | |
and html_url ~ 'turbot' | |
), | |
my_mentioned_issues as ( | |
select | |
* | |
from | |
github_search_issue | |
where | |
query = 'is:issue mentions:judell' | |
and html_url ~ 'turbot' | |
), | |
my_comments as ( | |
select | |
* | |
from | |
github_search_issue | |
where | |
query = 'is:issue in:comments judell' | |
and html_url ~ 'turbot' | |
), | |
combined as ( | |
select * from my_created_issues | |
union | |
select * from my_assigned_issues | |
union | |
select * from my_mentioned_issues | |
union | |
select * from my_comments | |
) | |
select distinct | |
html_url, | |
state, | |
title, | |
updated_at, | |
created_at, | |
comments | |
from | |
combined | |
order by | |
updated_at desc | |
) with data; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment