home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

9 rows where "closed_at" is on date 2020-05-02 and user = 9599 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: comments, author_association, updated_at (date), closed_at (date)

repo 3

  • github-to-sqlite 7
  • datasette 1
  • sqlite-utils 1

type 2

  • issue 8
  • pull 1

state 1

  • closed 9
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app reactions draft state_reason
493670730 MDU6SXNzdWU0OTM2NzA3MzA= 4 Command to fetch stargazers for one or more repos simonw 9599 closed 0     8 2019-09-14T21:58:22Z 2020-05-02T21:30:27Z 2020-05-02T21:30:27Z MEMBER  

Maybe this:

$ github-to-sqlite stargazers github.db simonw/datasette

It could accept more than one repos.

Maybe have options similar to --sql in twitter-to-sqlite so you can e.g. fetch all stargazers for all of the repos you have fetched into the database already (or all of the repos belonging to owner X)

github-to-sqlite 207052882 issue    
{
    "url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/4/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
516763727 MDExOlB1bGxSZXF1ZXN0MzM1OTgwMjQ2 8 stargazers command, refs #4 simonw 9599 closed 0     5 2019-11-03T00:37:36Z 2020-05-02T20:00:27Z 2020-05-02T20:00:26Z MEMBER dogsheep/github-to-sqlite/pulls/8

Needs tests. Refs #4.

github-to-sqlite 207052882 pull    
{
    "url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/8/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
611252244 MDU6SXNzdWU2MTEyNTIyNDQ= 750 Add notlike table filter simonw 9599 closed 0     3 2020-05-02T18:54:36Z 2020-05-02T19:10:44Z 2020-05-02T19:10:44Z OWNER  

I found myself wanting that for applying the opposite of this: https://github-to-sqlite.dogsheep.net/github/dependent_repos?dependent__like=%25simonw%2F%25&_sort_desc=dependent_stars

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/750/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
520756546 MDU6SXNzdWU1MjA3NTY1NDY= 12 Add this view for seeing new releases simonw 9599 closed 0     5 2019-11-11T06:00:12Z 2020-05-02T18:58:18Z 2020-05-02T18:58:17Z MEMBER  

sql CREATE VIEW recent_releases AS select json_object("label", repos.full_name, "href", repos.html_url) as repo, json_object( "href", releases.html_url, "label", releases.name ) as release, substr(releases.published_at, 0, 11) as date, releases.body as body_markdown, releases.published_at from releases join repos on repos.id = releases.repo order by releases.published_at desc

github-to-sqlite 207052882 issue    
{
    "url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/12/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
610511450 MDU6SXNzdWU2MTA1MTE0NTA= 35 Create index on issue_comments(user) and other foreign keys simonw 9599 closed 0     3 2020-05-01T02:06:56Z 2020-05-02T18:26:24Z 2020-05-02T18:26:24Z MEMBER  

create index issue_comments_user on issue_comments(user) I'm sure there are other user columns that could benefit from an index.

github-to-sqlite 207052882 issue    
{
    "url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/35/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
610842926 MDU6SXNzdWU2MTA4NDI5MjY= 36 Add view for better display of dependent repos simonw 9599 closed 0     2 2020-05-01T16:33:44Z 2020-05-02T16:50:31Z 2020-05-02T16:30:11Z MEMBER  

sql select repos.full_name as repo, 'https://github.com/' || repos2.full_name as dependent, repos2.created_at as dependent_repo_created, repos2.updated_at as dependent_repo_updated, repos2.stargazers_count as dependent_repo_stars, repos2.watchers_count as dependent_repo_watchers from dependents join repos as repos2 on dependents.dependent = repos2.id join repos on dependents.repo = repos.id order by repos2.created_at desc https://dogsheep.simonwillison.net/github?sql=select%0D%0A++repos.full_name+as+repo%2C%0D%0A++%27https%3A%2F%2Fgithub.com%2F%27+%7C%7C+repos2.full_name+as+dependent%2C%0D%0A++repos2.created_at+as+dependent_repo_created%2C%0D%0A++repos2.updated_at+as+dependent_repo_updated%2C%0D%0A++repos2.stargazers_count+as+dependent_repo_stars%2C%0D%0A++repos2.watchers_count+as+dependent_repo_watchers%0D%0Afrom%0D%0A++dependents%0D%0A++join+repos+as+repos2+on+dependents.dependent+%3D+repos2.id%0D%0A++join+repos+on+dependents.repo+%3D+repos.id%0D%0Aorder+by%0D%0A++repos2.created_at+desc

github-to-sqlite 207052882 issue    
{
    "url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/36/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
516967682 MDU6SXNzdWU1MTY5Njc2ODI= 10 Add this repos_starred view simonw 9599 closed 0     3 2019-11-04T05:44:38Z 2020-05-02T16:37:36Z 2020-05-02T16:37:36Z MEMBER  

sql create view repos_starred as select stars.starred_at, users.login, repos.* from repos join stars on repos.id = stars.repo join users on repos.owner = users.id order by starred_at desc;

github-to-sqlite 207052882 issue    
{
    "url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/10/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
610843136 MDU6SXNzdWU2MTA4NDMxMzY= 37 Mechanism for creating views if they don't yet exist simonw 9599 closed 0     3 2020-05-01T16:34:10Z 2020-05-02T16:19:47Z 2020-05-02T16:19:31Z MEMBER  

Needed for #36 #10 #12

github-to-sqlite 207052882 issue    
{
    "url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/37/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
611216862 MDU6SXNzdWU2MTEyMTY4NjI= 106 create_view(..., ignore=True, replace=True) parameters simonw 9599 closed 0     1 2020-05-02T15:45:21Z 2020-05-02T16:04:51Z 2020-05-02T16:02:10Z OWNER  

Two new parameters which specify what should happen if the view already exists. I want this for https://github.com/dogsheep/github-to-sqlite/issues/37

Here's the current create_view() implementation:

https://github.com/simonw/sqlite-utils/blob/b4d953d3ccef28bb81cea40ca165a647b59971fa/sqlite_utils/db.py#L325-L332

ignore=True will not do anything if the view exists already.

replace=True will drop and redefine the view - but only if its SQL definition differs, otherwise it will be left alone.

sqlite-utils 140912432 issue    
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/issues/106/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [pull_request] TEXT,
   [body] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
, [active_lock_reason] TEXT, [performed_via_github_app] TEXT, [reactions] TEXT, [draft] INTEGER, [state_reason] TEXT);
CREATE INDEX [idx_issues_repo]
                ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
                ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
                ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
                ON [issues] ([user]);
Powered by Datasette · Queries took 1604.807ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows