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

Webhook payload documentation #9485

Closed
4 tasks
Tracked by #3998
JustAnotherArchivist opened this issue Dec 24, 2019 · 5 comments
Closed
4 tasks
Tracked by #3998

Webhook payload documentation #9485

JustAnotherArchivist opened this issue Dec 24, 2019 · 5 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/docs This PR mainly updates/creates documentation

Comments

@JustAnotherArchivist
Copy link
Contributor

I am currently working on a custom notification system involving Gitea. The details of this setup aren't really relevant to the topic at hand; there'll be an HTTP server that takes events via webhooks and produces notifications to send elsewhere.

My problem: there's hardly any documentation on webhooks. The doc page merely lists the different hooks available (Gitea, Gogs, and a few proprietary chat platforms) and gives one example of a payload for push events plus PHP code to securely accept a message. Here's a list of things I'm missing:

  • Other event types (issue changes, PRs, etc.)
  • Which fields are available exactly, what are the data types and values, and which fields might be missing or have unexpected values depending on e.g. configuration or environment?
  • In which Gitea versions were the fields added, changed, or removed, so that I can determine which Gitea versions are compatible with my server?
  • What are the compatibility guarantees for future Gitea versions? Can I be reasonably sure that code written against current Gitea versions will work until the next major release (2.0)?
@lunny lunny added the type/docs This PR mainly updates/creates documentation label Dec 25, 2019
@stale
Copy link

stale bot commented Feb 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 23, 2020
@JustAnotherArchivist
Copy link
Contributor Author

Yes, this issue is still valid...

@stale stale bot removed the issue/stale label Feb 23, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Feb 23, 2020
@JustAnotherArchivist
Copy link
Contributor Author

Does any partial documentation on this exist in some obscure place I wasn't able to find, or would it have to be reconstructed from the commit history anyway? If so, it seems it shouldn't be very difficult to generate a documentation covering the first three points from the changes to modules/structs/hook.go. That file exists since commit 34eee25 (first released in 1.9.0), and it gets a bit messier before that due to a number of file moves/renames, but that should still be feasible; the structure of the file was the same ever since it was initially added in this repo in commit e378648 (before which it lived in the now obsolete and archived go-sdk repo, but that was all pre-1.0.0 and so probably doesn't really need to be documented). I could give that a shot.

@techknowlogick
Copy link
Member

https://github.com/drone/go-scm/tree/master/scm/driver/gitea provides examples that I refer to when looking into working with receiving webhooks

@lunny
Copy link
Member

lunny commented Aug 2, 2024

Duplicate of #21478

@lunny lunny marked this as a duplicate of #21478 Aug 2, 2024
@lunny lunny closed this as completed Aug 2, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

No branches or pull requests

3 participants