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

comments don't get echoed #2

Closed
thiagoarrais opened this issue Apr 6, 2017 · 5 comments
Closed

comments don't get echoed #2

thiagoarrais opened this issue Apr 6, 2017 · 5 comments
Assignees
Labels

Comments

@thiagoarrais
Copy link
Collaborator

the bot could echo comments on the pull request pages back and forth. that would allow the contributor and the upstream team to talk without breaking anonymity.

@thiagoarrais
Copy link
Collaborator Author

thiagoarrais commented May 2, 2017

Options:

  1. polling bot's PR issue comments

Docs: https://developer.github.com/v3/issues/comments/
Example: https://api.github.com/repos/thiagoarrais/personal-toolbox/issues/20/comments

  1. polling notifications api

Docs: https://developer.github.com/v3/activity/notifications/
Example: https://api.github.com/notifications

  1. expecting an integration webhook call for a comment on anonydog's relayed pull request

would be awesome. but it simply doesn't work :-)

anything else?

@thiagoarrais
Copy link
Collaborator Author

thiagoarrais commented May 7, 2017

current planed version:

  1. Poll https://api.github.com/notifications for any news on the various pull requests opened by the bot
  2. Upon getting a notification, go to it's subject/url (this should be the pull request API URL)
  3. Retrieve the pull request's comments (_links/comments) and diffline comments (_links/review_comments)
  4. Mirror each comment above to the original pull request (and store the original comment ids in some database to avoid re-mirroring).

Bonus points: mirror reviews. These are different from review comments (diffline comments). They can be found on the (experimental, not linked) URL https://api.github.com/repos/thiagoarrais/personal-toolbox/pulls/20/reviews

known drawback: this can't handle edited comments, since the notifications API does not expose those.

@thiagoarrais
Copy link
Collaborator Author

thiagoarrais commented May 18, 2017

Note to self: Normal comments are covered as of 694cba8. Need to work on review comments (diff comments).

@thiagoarrais
Copy link
Collaborator Author

thiagoarrais commented May 18, 2017

Review comments to-do list:

  • maintainer -> contributor (original)
  • maintainer -> contributor (reply)
  • contributor -> maintainer (original + reply)

@thiagoarrais
Copy link
Collaborator Author

reopened until deployed to prod

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

No branches or pull requests

1 participant