sopel-irc / sopel-github

GitHub plugin for Sopel
Other
3 stars 13 forks source link

Feature Request: Differentiate Pulls/Issues in Output #129

Closed ghost closed 10 months ago

ghost commented 1 year ago

Right now the bot says something like:

[GitHub] helix-editor/helix - A post-modern modal text editor. | 83.6% Rust 15.1% Scheme 0.6% Handlebars 0.7% Other | Last Push: 2023-08-19 @ 05:00CDT | Stargazers: 24179 | Watchers: 163 | Forks: 1740 | Network: 1740 | Open Issues: 1111

Ideally it would say (at this exact moment), something like:

[...] | Open Issues: 806 | Open PRs: 305

or

[...] | Open Issues: 806 | Open Pulls: 305


If the GitHub API makes this impossible...well...curses M$FT.

dgw commented 1 year ago

I'm having a lot of trouble navigating the sample responses in their tiny scrollable panes on my phone… The repository info feature fetches the /repos/:owner/:name API resource, so if you (or future-me) can find a relevant field therein, it'll be easy.

Alternate approach? Probably would have to issue at least one additional API request to fetch the PR count (total_results) and then subtract the open PR count from the total open issues.

ghost commented 10 months ago

Last I looked, not provided by the API easily, unfortunately. Only workaround is making a boatload of requests, which isn't really ideal.