home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where author_association = "OWNER", "created_at" is on date 2022-12-14 and issue = 1493390939 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

user 1

  • simonw 10

updated_at (date) 1 ✖

  • 2022-12-14 10

issue 1

  • UI to create reduced scope tokens from the `/-/create-token` page · 10 ✖

created_at (date) 1 ✖

  • 2022-12-14 · 10 ✖

author_association 1

  • OWNER · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1350414961 https://github.com/simonw/datasette/issues/1947#issuecomment-1350414961 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QfbJx simonw 9599 2022-12-14T05:22:00Z 2022-12-14T05:22:00Z OWNER

I think the next big step for this feature is for me to actually use it to build a few things.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350414402 https://github.com/simonw/datasette/issues/1947#issuecomment-1350414402 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QfbBC simonw 9599 2022-12-14T05:21:07Z 2022-12-14T05:21:07Z OWNER

It would be neat not to show write permissions against immutable databases too - and not hard from a performance perspective since it doesn't involve hundreds more permission checks.

That will need permissions to grow a flag for if they need a mutable database though, which is a bigger job.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350413555 https://github.com/simonw/datasette/issues/1947#issuecomment-1350413555 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5Qfazz simonw 9599 2022-12-14T05:19:52Z 2022-12-14T05:19:52Z OWNER

Maybe I should have kept _memory listed for instances that are running with --crossdb enabled?

Yeah I think I should.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350409537 https://github.com/simonw/datasette/issues/1947#issuecomment-1350409537 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QfZ1B simonw 9599 2022-12-14T05:14:16Z 2022-12-14T05:14:16Z OWNER

New interface now live at https://latest.datasette.io/-/create-token

It shouldn't be showing _memory though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350402667 https://github.com/simonw/datasette/issues/1947#issuecomment-1350402667 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QfYJr simonw 9599 2022-12-14T05:05:10Z 2022-12-14T05:05:10Z OWNER

Tests can go here:

https://github.com/simonw/datasette/blob/d98a8effb10ce8fe04a03eae42baa8a9cb0ca3f7/tests/test_auth.py#L143-L160

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350401651 https://github.com/simonw/datasette/issues/1947#issuecomment-1350401651 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QfX5z simonw 9599 2022-12-14T05:03:59Z 2022-12-14T05:03:59Z OWNER

I shipped a working interface. Could still do with some extra tests.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350215936 https://github.com/simonw/datasette/issues/1947#issuecomment-1350215936 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QeqkA simonw 9599 2022-12-14T01:23:42Z 2022-12-14T01:23:42Z OWNER

With tilde-encoding for database and table names the HTML looks like this:

html <input type="checkbox" name="table:weird:foo~3Abar:view-table">

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350148192 https://github.com/simonw/datasette/issues/1947#issuecomment-1350148192 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QeaBg simonw 9599 2022-12-14T00:19:06Z 2022-12-14T00:19:06Z OWNER

Another option: I could set a time limit - say 200ms - on how long I'm willing to spend calculating permissions before displaying this form

First calculate view permissions for tables and databases (and maybe views and canned queries too).

Then see if I can check every permission that I'm going to show as a checkbox on this page. If I get that done within the time limit use that to show the options.

If I run out of time show all options and maybe include a note saying that some of them may not actually be available.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350125018 https://github.com/simonw/datasette/issues/1947#issuecomment-1350125018 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QeUXa simonw 9599 2022-12-14T00:08:09Z 2022-12-14T00:08:09Z OWNER

Also: don't show hidden tables.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  
1350124381 https://github.com/simonw/datasette/issues/1947#issuecomment-1350124381 https://api.github.com/repos/simonw/datasette/issues/1947 IC_kwDOBm6k_c5QeUNd simonw 9599 2022-12-14T00:07:51Z 2022-12-14T00:07:51Z OWNER

Another thing to consider in the future: once Datasette can support thousands of tables (see #417) the list on this page will turn into multiple MBs of HTML, which may cause all kinds of problems - not to mention the overhead of all of those table visibility permission checks.

Hopefully by then I'll have a good fix for the permission listings problem: - #1152

And I can apply the same mechanism here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI to create reduced scope tokens from the `/-/create-token` page 1493390939  

Advanced export

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

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 21.838ms · About: github-to-sqlite