home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where author_association = "OWNER" and "updated_at" is on date 2020-06-12 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 7

  • Release Datasette 0.44 3
  • startup() plugin hook 3
  • Log out mechanism for clearing ds_actor cookie 2
  • Writable canned queries live demo on Glitch 1
  • Example authentication plugin 1
  • Incorrect URLs when served behind a proxy with base_url set 1
  • Ability to execute insert/update statements with the CLI 1

user 1

  • simonw 12

author_association 1

  • OWNER · 12 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
643510240 https://github.com/simonw/datasette/issues/834#issuecomment-643510240 https://api.github.com/repos/simonw/datasette/issues/834 MDEyOklzc3VlQ29tbWVudDY0MzUxMDI0MA== simonw 9599 2020-06-12T22:40:26Z 2020-06-12T22:40:26Z OWNER

Another use-case: plugins that need their own database with the correct tables. They can write to the database on startup to create their tables.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
startup() plugin hook 637342551  
643509358 https://github.com/simonw/datasette/issues/834#issuecomment-643509358 https://api.github.com/repos/simonw/datasette/issues/834 MDEyOklzc3VlQ29tbWVudDY0MzUwOTM1OA== simonw 9599 2020-06-12T22:36:37Z 2020-06-12T22:36:37Z OWNER

This should be able to optionally return an async function which is then awaited.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
startup() plugin hook 637342551  
643501428 https://github.com/simonw/datasette/issues/805#issuecomment-643501428 https://api.github.com/repos/simonw/datasette/issues/805 MDEyOklzc3VlQ29tbWVudDY0MzUwMTQyOA== simonw 9599 2020-06-12T22:06:08Z 2020-06-12T22:06:08Z OWNER

This needs the startup hook, see https://github.com/simonw/datasette/issues/834#issuecomment-643501064

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Writable canned queries live demo on Glitch 632724154  
643501064 https://github.com/simonw/datasette/issues/834#issuecomment-643501064 https://api.github.com/repos/simonw/datasette/issues/834 MDEyOklzc3VlQ29tbWVudDY0MzUwMTA2NA== simonw 9599 2020-06-12T22:04:43Z 2020-06-12T22:04:43Z OWNER

Another use-case for this: I want to use the --root option on Glitch but it gives me a 127.0.0.1 URL. Glitch has a PROJECT_DOMAIN environment variable which tells me the URL. A datasette-glitch plugin could use a startup hook to output the correct login URL.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
startup() plugin hook 637342551  
643454625 https://github.com/simonw/datasette/issues/840#issuecomment-643454625 https://api.github.com/repos/simonw/datasette/issues/840 MDEyOklzc3VlQ29tbWVudDY0MzQ1NDYyNQ== simonw 9599 2020-06-12T19:47:38Z 2020-06-12T19:47:53Z OWNER

Another problem: what to display in the "you are logged in as", since we don't dictate an actor design.

I'm going to use a includes template for this that can easily be over-ridden by administrators or by plugins.

The default will look for the first available of the following keys:

  • display
  • name
  • username
  • login
  • id
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Log out mechanism for clearing ds_actor cookie 637966833  
643453128 https://github.com/simonw/datasette/issues/840#issuecomment-643453128 https://api.github.com/repos/simonw/datasette/issues/840 MDEyOklzc3VlQ29tbWVudDY0MzQ1MzEyOA== simonw 9599 2020-06-12T19:43:15Z 2020-06-12T19:43:15Z OWNER

I don't like how this often involves a logout link that can be maliciously activated.

I'm going to use a CSRF protected form button styled to look like a link instead.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Log out mechanism for clearing ds_actor cookie 637966833  
643406939 https://github.com/simonw/sqlite-utils/issues/115#issuecomment-643406939 https://api.github.com/repos/simonw/sqlite-utils/issues/115 MDEyOklzc3VlQ29tbWVudDY0MzQwNjkzOQ== simonw 9599 2020-06-12T17:51:11Z 2020-06-12T17:51:11Z OWNER

https://github.com/simonw/sqlite-utils/blob/03ee97d2258254581bea72842518904fc1cbe60f/tests/test_cli.py#L1112-L1128

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to execute insert/update statements with the CLI 637889964  
643010591 https://github.com/simonw/datasette/issues/806#issuecomment-643010591 https://api.github.com/repos/simonw/datasette/issues/806 MDEyOklzc3VlQ29tbWVudDY0MzAxMDU5MQ== simonw 9599 2020-06-12T01:13:06Z 2020-06-12T01:13:06Z OWNER

Tests are passing again: https://github.com/simonw/datasette/commit/9ae0d483ead93c0832142e5dc85959ae3c8f73ea

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Release Datasette 0.44 632753851  
643000948 https://github.com/simonw/datasette/issues/806#issuecomment-643000948 https://api.github.com/repos/simonw/datasette/issues/806 MDEyOklzc3VlQ29tbWVudDY0MzAwMDk0OA== simonw 9599 2020-06-12T00:34:21Z 2020-06-12T00:34:21Z OWNER

I'm going to add https://github.com/simonw/datasette-auth-tokens and https://github.com/simonw/datasette-permissions-sql to the documentation and release notes in a few places.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Release Datasette 0.44 632753851  
642998097 https://github.com/simonw/datasette/issues/806#issuecomment-642998097 https://api.github.com/repos/simonw/datasette/issues/806 MDEyOklzc3VlQ29tbWVudDY0Mjk5ODA5Nw== simonw 9599 2020-06-12T00:26:00Z 2020-06-12T00:26:00Z OWNER

OK, I'm ready to ship. Last check of the release notes, then I'll update the news section in the README and release 0.44!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Release Datasette 0.44 632753851  
642993277 https://github.com/simonw/datasette/issues/838#issuecomment-642993277 https://api.github.com/repos/simonw/datasette/issues/838 MDEyOklzc3VlQ29tbWVudDY0Mjk5MzI3Nw== simonw 9599 2020-06-12T00:18:26Z 2020-06-12T00:18:50Z OWNER

Have you tried this without the ProxyPassReverse directive? I'm worried that might be confusing Datasette.

This is the test I used to ensure this feature works - it scrapes all of the links on a bunch of different pages. Could it be missing something here?

https://github.com/simonw/datasette/blob/647c5ff0f3e8140f40d7f41f0874ce4e1f4df65c/tests/test_html.py#L1233-L1274

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Incorrect URLs when served behind a proxy with base_url set 637395097  
642991513 https://github.com/simonw/datasette/issues/824#issuecomment-642991513 https://api.github.com/repos/simonw/datasette/issues/824 MDEyOklzc3VlQ29tbWVudDY0Mjk5MTUxMw== simonw 9599 2020-06-12T00:11:50Z 2020-06-12T00:11:50Z OWNER

Done: https://github.com/simonw/datasette-auth-tokens and https://pypi.org/project/datasette-auth-tokens/

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Example authentication plugin 635108074  

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