sopel-irc / sopel-github

GitHub plugin for Sopel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline issue references generate error spam

dgw opened this issue · comments

commented

In a channel where people like to talk about numbered stuff in contexts other than issues, it's pretty easy to trigger errors from sopel-github when a number higher than the maximum issue/PR number in the linked repo is mentioned.

We should suppress "[GitHub] API says this is an invalid issue" errors for inline refs without a (user/)repo attached.

commented

Another edge case: A link such as https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies#4-spam-and-inauthentic-activity-on-github generates an error because the plugin looks for an issue at acceptable-use-policies/github-acceptable-use-policies#4 (which doesn't exist, at time of writing).

In summary:

  • Suppress errors for bare #123 inline refs with no (user/)repo component
  • Don't look for inline refs inside links, and probably just require a word boundary before and after the whole ref
commented

Errors are blanket-suppressed with #136. For a more nuanced approach, as noted in that PR, it would be better to wait until after some long-overdue code cleanup/refactoring can happen.