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

Add webhook without leaving mattermost #15

Closed
manland opened this issue Apr 16, 2019 · 4 comments · Fixed by #137
Closed

Add webhook without leaving mattermost #15

manland opened this issue Apr 16, 2019 · 4 comments · Fixed by #137
Assignees
Labels
Difficulty/3:Hard Hard ticket Type/Enhancement New feature or improvement of existing feature

Comments

@manland
Copy link
Contributor

manland commented Apr 16, 2019

As a user (before I dev this plugin) I didn't know how to add a project to listen to in github-plugin. I didn't read the readme... meaculpa. But I think to be more easy to use we should add webhook for user. Like that user just /gitlab subscribe owner/project and all the magic make the job.

Obviously for group, we need to fetch all projects and add it to every repos. If user create a new project after this init step we will miss it... maybe we can cron a synchronizer...

https://docs.gitlab.com/ce/api/projects.html#add-project-hook

@ericjaystevens
Copy link
Contributor

ericjaystevens commented Feb 5, 2020

I'll take this after #130

@manland
Copy link
Contributor Author

manland commented Feb 5, 2020

@ericjaystevens I have started the Dev in #53 but I'm blocking because of missing feature in gitlab (API to add webhook for group). A contributor has started to work on it last week at gitlab... Wait and see!

@ericjaystevens
Copy link
Contributor

@manland my understanding of your approach to this issue is to create hooks in the /gitlab subscribe command. This solution is great because it does auto-syncing and lets users not worry about webhooks.

An alternative approach we should consider is adding a sync switch the subscribe command that lets the users explicitly choose to use this approach. We would then also offer dedicated commands for people who want to manage project and group hooks manually.

So my proposal would look something like

/gitlab subscribe owner[/repo] [features] [syncWebhooks] - Subscribe the current channel to receive notifications about opened merge requests and issues for a group or repository
   - syncWebhooks - automatically creates project and team webhooks as needed to point to your Mattermost instance.

/gitlab webhook add owner[/repo] [features] - Adds a webhook pointing to your Mattermost URL.
/gitlab webhook remove owner[/repo] - Removes all webhooks for a group or project that points to your Mattermost URL
/gitlab webhook list owner[/repo] - lists all webhooks for a group or project.

@manland
Copy link
Contributor Author

manland commented Feb 25, 2020

@ericjaystevens yes IMHO it's a good addition and with #36 it's a perfect fit for user to discover what is in sync and what not! I'm sorry I haven't time to do it (baby come 😅). If you want to continue #53 you are more than welcome!

@hanzei hanzei added Difficulty/3:Hard Hard ticket Type/Enhancement New feature or improvement of existing feature and removed Enhancement labels Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty/3:Hard Hard ticket Type/Enhancement New feature or improvement of existing feature
Projects
None yet
3 participants