API to get the discussion that an issue was moved to #45807
Replies: 6 comments
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hi, GitHub provides a GraphQL API that allows you to access issues and discussions. You can query both issues and discussions to gather relevant information. query {
repository(owner: "owner", name: "repo") {
issue(number: ISSUE_NUMBER) {
id
title
body
}
discussion(number: DISCUSSION_NUMBER) {
id
title
body
}
}
} |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Currently, GitHub does not provide a direct API endpoint to retrieve discussions that an issue has been moved to. However, your use case highlights an important feature that could enhance the functionality of the GitHub API, especially for projects transitioning from Issues to Discussions.Introduce a feature allowing issues to retain a reference ID of the associated discussion when moved. This could be implemented as an additional field in the issue or discussion object, providing a clear link between the two.Extend the existing GraphQL API to include a way to fetch discussions linked to an issue. This should provide |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Not sure if this is a question or a feature request.
I would like an API to get the discussion that an issue was moved to.
Context
There's a GraphQL API to access issues with most of their fields, and there's also an equivalent one for GitHub Discussions.
Now that GitHub Discussions can have templates, I'm finally moving the questions in https://github.com/tiangolo/fastapi to use Discussions instead of Issues.
I use the API to check who's coming to help others and compute the FastAPI Experts (https://fastapi.tiangolo.com/fastapi-people/#experts).
The way that works is that I each question where someone made a comment.
But if I move an issue to a discussion (e.g. moving the old 2k closed issues with questions) I would end up with one issue AND one discussion with the same content, but I would have no way to know that one comes from the other, to count each one only once.
Beta Was this translation helpful? Give feedback.
All reactions