home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

3 rows where state = "open" and user = 9020979 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: author_association, created_at (date), updated_at (date)

repo 2

  • datasette 2
  • github-to-sqlite 1

type 1

  • issue 3

state 1

  • open · 3 ✖
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
1198822563 I_kwDOBm6k_c5HdJSj 1706 [feature] immutable mode for a directory, not just individual sqlite file hydrosquall 9020979 open 0     4 2022-04-10T00:50:57Z 2022-12-09T19:11:40Z   CONTRIBUTOR  

Motivation

  • I have a directory of sqlite databases
  • I'd like to use immutable mode when opening them for better performance docs
  • Currently using this flag throws the following error

    IsADirectoryError: [Errno 21] Is a directory: '/name-of-directory'

Proposal

Immutable flag works for both single files and directories

datasette -i /folder-of-sqlite-files
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1706/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1211283427 I_kwDODFdgUs5IMrfj 72 feature: display progress bar when downloading multi-page responses hydrosquall 9020979 open 0     1 2022-04-21T16:37:12Z 2022-04-21T17:29:31Z   NONE  

Motivation

For a long running command (longer than 1 minute) for a big table (like pull requests or commits), it can be tricky to know if the script is still running, or if a rate limit/error was encountered

We know how many pages there are, so it may be possible to indicate how many remain.

https://github.com/dogsheep/github-to-sqlite/blob/a6e237f75a4b86963d91dcb5c9582e3a1b3349d6/github_to_sqlite/utils.py#L367

Resources

  • Using the existing Click API:
  • https://click.palletsprojects.com/en/5.x/utils/#showing-progress-bars
  • Loading spinner: https://github.com/pavdmyt/yaspin
  • Progress bar: https://github.com/tqdm/tqdm
github-to-sqlite 207052882 issue    
{
    "url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/72/reactions",
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1182227211 I_kwDOBm6k_c5Gd1sL 1692 [plugins][feature request]: Support additional script tag attributes when loading custom JS hydrosquall 9020979 open 0     2 2022-03-27T01:16:03Z 2022-03-30T06:14:51Z   CONTRIBUTOR  

Motivation

  • The build system for my new plugin has two output JS files, one for browsers that support ES modules, one for browsers that don't. At present, I'm only passing one of them into Datasette.
  • I'd like to specify the non-es-module script as a fallback for older browsers. I don't want to load it by default, because browsers will only need one, and it's heavy, so for now I'm only supporting modern browsers.

To be able to support legacy browsers without slowing down users with modern browsers, I would like to be able to set additional HTML attributes on the tag fallback script, nomodule and defer. My injected scripts should look something like this:

```html

<script type="module" src="/index.my-es-module-bundle.js"></script> <script src="/index.my-legacy-fallback-bundle.js" nomodule="" defer></script>

```

Proposal

To achieve this, I propose additional optional properties to the API accepted by the extra_js_urls hook and custom JS field the metadata.json described here.

Under this API, I'd write something like this to get the above HTML rendered in Datasette.

json { "extra_js_urls": [ { "url": "/index.my-es-module-bundle.js", "module": true, }, { "url": "/index.my-legacy-fallback-bundle.js", "nomodule": "", "defer": true } ] }

Resources

  • MDN on the script tag
  • There may be other properties that could be added that are potentially valuable, like async or referrerpolicy, but I don't have an immediate need for those.
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1692/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   

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 107.431ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows