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

Investigate supporting GitHub Discussions webhooks #480

Closed
mickmister opened this issue Sep 16, 2021 · 8 comments · Fixed by #808 · May be fixed by mattermost/docs#7371
Closed

Investigate supporting GitHub Discussions webhooks #480

mickmister opened this issue Sep 16, 2021 · 8 comments · Fixed by #808 · May be fixed by mattermost/docs#7371
Assignees
Labels
Difficulty/2:Medium Medium ticket Help Wanted Community help wanted Tech/Go

Comments

@mickmister
Copy link
Contributor

There is a request to support subscriptions for GItHub Discussions, which is a topic-based discussion tool provided by GitHub. Here's the original request from community:


Hi everyone, apologies if this is the wrong place to raise this. Our team currently love and use the plugin all the time and were wondering if there are plans to add subscriptions for "discussions"? Like how under "features" there are issues, pulls, etc. Would be very handy if "discussions" could be subscribed to, with pretty much the same behaviour as issues, so when created, commented on, etc.

Issue created from a Mattermost message by @samw.

@sibasankarnayak
Copy link
Contributor

@mickmister tried exploring the solution for this,
currently stable version of GitHub webhook is not having event for any discussion event ,there are lot of user who are waiting for it since 2020 hope to see it soon as it is being tested in a private repo from the contributor's GitHub
here are some reference of same

community/community#2959
community/community#2943
community/community#3910
community/community#4173

let me know if we want to try the beta model of webhook , not sure but can try it if we can use same.

@mickmister
Copy link
Contributor Author

@sibasankarnayak Thanks a bunch for looking into this. 1/5 Let's hold off on implementing this until the offering from GitHub is more stable, as this ticket is not particularly a highly requested feature. Hopefully the necessary pieces become part of the go-github package as well.

I'll keep the issue open though since it seems like it does seem to have some traction (based on reactions of the issue).

@hanzei Thoughts on this whole situation?

@hanzei
Copy link
Contributor

hanzei commented Oct 4, 2021

👍 for waiting a bit. Until go-github supports discussion and there is webhook support, there is no reasonable way to implementing this feature request.

@Samuel-Webster
Copy link

Hey everyone, just curious if the support from GitHub / other dependencies is there yet to look at supporting this when there is time? I tried to look into it a bit, and it looks like there is now, but I'm not intimate with what's required exactly.

@hanzei
Copy link
Contributor

hanzei commented Jan 25, 2022

Everything is there now. https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#discussion covers the API docs and go-github also supports it: https://pkg.go.dev/github.com/google/go-github/v42/github#DiscussionEvent

@hanzei hanzei added Help Wanted Community help wanted Up For Grabs Ready for help from the community. Removed when someone volunteers labels Jan 25, 2022
@elewis787
Copy link
Contributor

I will take a look at getting this added. Please assign it to me and I will work on adding support for this.

@elewis787
Copy link
Contributor

Quick update, I will have a PR for this soon. I have not added the ability to directly comment or answer discussions using the GitHub plugin at this time.

My initial approach has been to get the discussion and discussion comments flowing via GitHub webhooks only.

@elewis787
Copy link
Contributor

elewis787 commented Jul 23, 2024

Here is a first pass #808.

Please let me know what you would like to see changed! I did not go too deep on the templating.

@hanzei hanzei linked a pull request Jul 23, 2024 that will close this issue
@hanzei hanzei removed the Up For Grabs Ready for help from the community. Removed when someone volunteers label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment