home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "OWNER" and "updated_at" is on date 2022-11-02 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date)

user 1

  • simonw 6

issue 1

  • API explorer tool 6

author_association 1

  • OWNER · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1299607082 https://github.com/simonw/datasette/issues/1871#issuecomment-1299607082 https://api.github.com/repos/simonw/datasette/issues/1871 IC_kwDOBm6k_c5Ndm4q simonw 9599 2022-11-02T05:45:31Z 2022-11-02T05:45:31Z OWNER

I'm going to add a link to the Datasette API docs for the current running version of Datasette, e.g. to https://docs.datasette.io/en/0.63/json_api.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
API explorer tool 1427293909  
1299600257 https://github.com/simonw/datasette/issues/1871#issuecomment-1299600257 https://api.github.com/repos/simonw/datasette/issues/1871 IC_kwDOBm6k_c5NdlOB simonw 9599 2022-11-02T05:36:40Z 2022-11-02T05:36:40Z OWNER

The API Explorer should definitely link to the /-/create-token page for users who have permission though.

And it should probably go in the Datasette application menu?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
API explorer tool 1427293909  
1299599461 https://github.com/simonw/datasette/issues/1871#issuecomment-1299599461 https://api.github.com/repos/simonw/datasette/issues/1871 IC_kwDOBm6k_c5NdlBl simonw 9599 2022-11-02T05:35:36Z 2022-11-02T05:36:15Z OWNER

Here's a slightly wild idea: what if there was a button on /-/api that you could click to turn on "API explorer mode" for the rest of the Datasette interface - which sets a cookie, and that cookie means you then see "API explorer" links in all sorts of other relevant places in the Datasette UI (maybe tucked away in cog menus).

Only reason I don't want to show these to everyone is that I don't think this is a very user-friendly feature: if you don't know what an API is I don't want to expose you to it unnecessarily.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
API explorer tool 1427293909  
1299598570 https://github.com/simonw/datasette/issues/1871#issuecomment-1299598570 https://api.github.com/repos/simonw/datasette/issues/1871 IC_kwDOBm6k_c5Ndkzq simonw 9599 2022-11-02T05:34:28Z 2022-11-02T05:34:28Z OWNER

This is pretty useful now. Two features I still want to add:

  • The ability to link to the API explorer such that the form is pre-filled with material from the URL. Need to guard against clickjacking first though, so no-one can link to it in an invisible iframe and trick the user into hitting POST.
  • Some kind of list of endpoints so people can click links to start using the API explorer. A list of every table the user can write to with each of their /db/table/-/insert endpoints for example.
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
API explorer tool 1427293909  
1299597066 https://github.com/simonw/datasette/issues/1871#issuecomment-1299597066 https://api.github.com/repos/simonw/datasette/issues/1871 IC_kwDOBm6k_c5NdkcK simonw 9599 2022-11-02T05:32:22Z 2022-11-02T05:32:22Z OWNER

Demo of the latest API explorer:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
API explorer tool 1427293909  
1299388341 https://github.com/simonw/datasette/issues/1871#issuecomment-1299388341 https://api.github.com/repos/simonw/datasette/issues/1871 IC_kwDOBm6k_c5Ncxe1 simonw 9599 2022-11-02T00:24:28Z 2022-11-02T00:25:00Z OWNER

I want JSON syntax highlighting.

https://github.com/luyilin/json-format-highlight is an MIT licensed tiny highlighter that looks decent for this.

https://unpkg.com/json-format-highlight@1.0.1/dist/json-format-highlight.js

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
API explorer tool 1427293909  

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 922.498ms · About: github-to-sqlite