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
Badge request: GitHub Discussions #6047
Comments
|
GraphQL API for Discussions is finally announced. Does it mean we can expect the corresponding badge please? |
Thanks for the posts with updates!
It's possible for someone to potentially work on it now that GitHub has made it possible to retrieve the underlying data. That doesn't necessarily mean someone is going immediately start working on the implementation though 😉 We've got a great Tutorial on how to add a badge if you or anyone else is interested in working on this, and there's other GitHub badges which leverage the v4 GraphQL API (e.g. deployments badge) that should serve as a good reference. I think it would also be helpful if you could enumerate the specific badges you'd like to see so that someone working on adding the badge knows what the target is. For example, are you requesting badges that show the raw respective counts of answered vs unanswered vs total discussions? |
|
Hi, there is an easy way to get the total number of discussions for a repository - the I'm trying to work out how we can efficiently get the answered/unanswered discussions but cannot think of anything after going through the docs and trying out some sample queries in the explorer, since we can only fetch 100 records at once, and repeatedly calling the API for a repository that contains thousands of discussion threads doesn't seem very productive. This is my first encounter with GraphQL, so please pardon me if I am missing something. |
Not too sure either, maybe it's worth asking at https://github.community or raising as feedback at https://github.com/github/feedback? Having a badge with the total number of discussions would be a good first step though, we don't need to get all the above badges in one go. :) |
|
I have asked in both places for good measure - GitHub Forum, Discussions Feedback. Will start working on the total discussions badge soon ✌ |
|
The discussions API requires a header to be set ( 'GraphQL-Features': 'discussions_api'). My current However, the header is not being recognized. Am I doing something wrong? I tried to debug the part where the API call is made, and the header is being passed properly. Even then the error thrown looks like the one when we don't pass the error. I cannot find any implementations where we pass headers to GraphQL APIs, so I'm kind of stuck. Please help! EDIT: Seems like the headers weren't being incorporated while actually sending the request. Will fix this in my PR |
|
You may know this already this already, but running the service tests with |
|
Our first Discussions badge is now available, thanks to @profgrammer! 🍾 For example: The other badge requests are not really possible at the moment given the limitations of the GitHub API. See #6047 (comment) for more details. I'll add the |
|
I learnt many things. |
📋 Description
Since GitHub has recently launched Discussions, the relevant badges will be useful. The number of answered/unanswered/total discussions is the most obvious stats to be displayed, e.g.: https://img.shields.io/badge/discussions-100%20open-brightgreen
🔗 Data
It seems that while the GH Discussions feature is still in beta, no relevant public API is available at the moment. If that's true (I can't find any other information but other thoughts on this issue are most welcome), we'll have to wait when the API is implemented.
🎤 Motivation
It can bring more people to discussions what is especially relevant now as the feature has been recently introduced and not everyone visiting the repo may be aware of it.
Personally, we'd like to use it for werf and some other projects to let our community know they can use GH discussions to interact with developers and other users. Previously, we've been using our self-hosted forums (based on Discourse) and relevant badges.
The text was updated successfully, but these errors were encountered: