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

feat(github): support <repo>/discussions/<id> links, expanding discussions #265

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shiftinv
Copy link
Contributor

@shiftinv shiftinv commented May 8, 2024

Adds |discussions to the url regex, and slightly refactors the handling in fetch_issues to save an unnecessary REST call if we already know it won't succeed.
Additionally adds all the required fields to the GQL query to support expanding discussions, like issues/PRs.

That being said, /issues/<discussion_id> still works as before and links the discussion with that ID, despite the url being /issues/. This currently does a REST + GQL call.
It would be trivial to change this to only do the REST call, dropping support for linking discussions via the /issues/ url. GitHub itself correctly redirects these links to /discussions/, so I'm not sure if dropping support would be a good idea.

@shiftinv shiftinv changed the title feat(github): support <repo>/discussions/<id> links feat(github): support <repo>/discussions/<id> links, expanding discussions May 9, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant