-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add Matrix webhook #10831
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 Matrix webhook #10831
Conversation
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not test but looks good ;)
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #10831 +/- ##
==========================================
- Coverage 43.49% 43.40% -0.10%
==========================================
Files 592 593 +1
Lines 82979 83265 +286
==========================================
+ Hits 36094 36141 +47
- Misses 42399 42632 +233
- Partials 4486 4492 +6
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matrix events accept arbitrary JSON, so it might be nice to send some raw webhook data too. That way it could be used as a full alternative for traditional webhooks instead of just a chat thing. The only limit is that events can't be more than ~64 KiB, not sure how likely webhook data is to hit that.
Something like this:
{
"msgtype": "m.text",
"body": "...",
"io.gitea.webhook": {
"commits": [...]
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per comments above
Co-Authored-By: Tulir Asokan <tulir@maunium.net>
Using the |
Can't add matrix as default webhooks or system webooks from site administration, when select matrix, it doesn't return any form. |
@EgroegOahz please create a ticket for this. |
This PR adds the possibility to add Matrix webhooks as requested in #6590.
Since the the URL displayed is a little bit long (spanning multiple lines), we might need to change
gitea/templates/repo/settings/webhook/list.tmpl
Line 50 in b1c331c