Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Google Comments source #820

Closed
nokome opened this issue Nov 11, 2020 · 2 comments
Closed

Add a Google Comments source #820

nokome opened this issue Nov 11, 2020 · 2 comments
Assignees

Comments

@nokome
Copy link
Member

nokome commented Nov 11, 2020

In #818 we propose adding the Review model. Our intention, as with Files, is that users can specify external Sources for Reviews. One source for a Review is one or more comments on a Google Doc (or other Google Drive app).

Comments are associated with a file (i.e. GET https://www.googleapis.com/drive/v2/files/fileId/comments) and we would normally want to only include comments from a subset of users (so we could separate multiple comments on a doc into separate reviews). So, the GoogleCommentsSource would need to have the following fields:

  • google_id (inherited from GoogleDriveSource ?)
  • reviewers (a list of emails, names, or regexes that can be used to filter comments)

I propose that we treat the first comment by a reviewer as the content of the review, assume that it is Markdown formatted, and either:

  • decode the Markdown to a Node and link that as the main content of the Review instance
  • write the Markdown to a File and link that as the main content of the Review instance

The related Google API docs are:

Requires #818.

@nokome nokome self-assigned this Nov 11, 2020
@alex-ketch
Copy link
Contributor

alex-ketch commented Nov 12, 2020

For simplicity in the initial version, we the first comment in the document will be used as the review body/summary. Not the first chronological comment as I had initially interpreted 😅
Also, it seems there isn't a need for custom CommentsSource models. Instead the comments are simply fetched/stored in the database by regular worker jobs.

@nokome nokome mentioned this issue Nov 27, 2020
@nokome
Copy link
Member Author

nokome commented Dec 1, 2020

Closing this as initial version has been completed as part of #868.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants