home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 440437037 and user = 9599 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw · 5 ✖

issue 1

  • Plugin for allowing CORS from specified hosts · 5 ✖

author_association 1

  • OWNER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
538173651 https://github.com/simonw/datasette/issues/454#issuecomment-538173651 https://api.github.com/repos/simonw/datasette/issues/454 MDEyOklzc3VlQ29tbWVudDUzODE3MzY1MQ== simonw 9599 2019-10-03T23:59:56Z 2019-10-03T23:59:56Z OWNER

I built and shipped this back in July: https://github.com/simonw/datasette-cors

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin for allowing CORS from specified hosts 440437037  
491003082 https://github.com/simonw/datasette/issues/454#issuecomment-491003082 https://api.github.com/repos/simonw/datasette/issues/454 MDEyOklzc3VlQ29tbWVudDQ5MTAwMzA4Mg== simonw 9599 2019-05-09T17:53:45Z 2019-05-09T17:53:57Z OWNER

I built a new ASGI middleware component for CORS headers which I can use to implement this: https://pypi.org/project/asgi-cors/ and https://github.com/simonw/asgi-cors

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin for allowing CORS from specified hosts 440437037  
489433651 https://github.com/simonw/datasette/issues/454#issuecomment-489433651 https://api.github.com/repos/simonw/datasette/issues/454 MDEyOklzc3VlQ29tbWVudDQ4OTQzMzY1MQ== simonw 9599 2019-05-05T14:52:46Z 2019-05-05T14:52:46Z OWNER

I really like the idea of this as a plugin, because it will provide a great example of an ASGI plugin including how to build unit tests against Datasette plugins which actually start up a Datasette server and run some requests through it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin for allowing CORS from specified hosts 440437037  
489420661 https://github.com/simonw/datasette/issues/454#issuecomment-489420661 https://api.github.com/repos/simonw/datasette/issues/454 MDEyOklzc3VlQ29tbWVudDQ4OTQyMDY2MQ== simonw 9599 2019-05-05T12:11:01Z 2019-05-05T12:11:01Z OWNER

Also worth considering: Access-Control-Max-Age: 86400 support - maybe as a "max_age" setting for the plugin. This can reduce the number of preflight checks the browser needs to make.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin for allowing CORS from specified hosts 440437037  
489420385 https://github.com/simonw/datasette/issues/454#issuecomment-489420385 https://api.github.com/repos/simonw/datasette/issues/454 MDEyOklzc3VlQ29tbWVudDQ4OTQyMDM4NQ== simonw 9599 2019-05-05T12:07:56Z 2019-05-05T12:10:13Z OWNER

Since I want the option to store more than one host, I don't think this should be a command-line option or a --config setting. Instead, I'm inclined to add this to metadata.json.

Maybe this should be a plugin? That way the metadata.json setting could look like this: { "title": "Title of this instance", "plugins": { "datasette-cors": { "allowed_origins": ["https://example.com"] } } }

This could be implemented easily on top of ASGI #272.

(It should probably raise an exception on startup if any of the allowed_origins ends with a slash e.g. "https://example.com/" since that's not actually a valid origin, and it's an easy mistake to make.)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin for allowing CORS from specified hosts 440437037  

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