sopel-irc / sopel-github

GitHub plugin for Sopel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Additional issue/PR event link handling

half-duplex opened this issue · comments

commented

Re: IRC discussion
The utility of issue display can be improved by parsing the "hash" part of URLs and displaying the linked comment instead of only the original issue/PR description.

Current:

<+dgw> Edited to add: "Meh." :P https://github.com/sopel-irc/sopel-github/pull/26#pullrequestreview-226279842                    
< Sopel> [GitHub] [sopel-irc/sopel-github #26] HumorBaby: webhook: restrict incoming requests | A bad actor can use this [snip multi-line description]

An improvement would be something like:

< Sopel> [GitHub] [sopel-irc/sopel-github #26] HumorBaby: webhook: restrict incoming requests | dgw comments: Let's call it ready. Maybe this will go into 0.2.0 after all! haha
commented

Thanks for opening this!

Let's collect known document fragment types and what they map to (for API calls):

  • #pullrequestreview-<review_id> — a pull request review, with its review_id (API doc)
  • #issuecomment-<comment_id> — a comment on the issue/PR, with its comment_id (API doc; already handled, seemingly since at least v0.1.1)
  • #discussion_r<comment_id> — PR file/line comment, with its comment_id (API doc)
  • #issue-<comment_id> — ignore; points to the issue/PR description (top comment) we already fetch

Once we figure out what to handle, the list above can be made into a task list in the issue OP.

Are there other timeline events that would be worth parsing permalinks for? Force-pushes? Review requests? Assignments? Milestone changes? Labels? References to other PRs/issues? (Many of them just use a generic #event-<ID> fragment format, where the ID maps to this API call.)

commented

I feel bad about punting this again, but I'd really like to get 0.4.0 out in the next week-ish and it would take longer than that to get everything here squared away.