document webhook event types #9693

Open
opened 2025-11-02 08:46:47 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @KiaraGrouwstra on GitHub (Oct 16, 2022).

Originally assigned to: @lunny on GitHub.

Feature Description

our webhook docs imply an event type, for which they mention push as an example.
it would be nice if we could document what event types gitea offers, and when these might trigger, if more than just push.

Screenshots

No response

Originally created by @KiaraGrouwstra on GitHub (Oct 16, 2022). Originally assigned to: @lunny on GitHub. ### Feature Description our [webhook docs](https://docs.gitea.io/en-us/webhooks/) imply an event type, for which they mention `push` as an example. it would be nice if we could document what event types gitea offers, and when these might trigger, if more than just `push`. ### Screenshots _No response_
GiteaMirror added the type/docs label 2025-11-02 08:46:47 -06:00
Author
Owner

@Timoses commented on GitHub (Nov 22, 2022):

Dito.

A good place to start may be:

@Timoses commented on GitHub (Nov 22, 2022): Dito. A good place to start may be: * Repo webhook settings page: https://github.com/go-gitea/gitea/blob/main/templates/repo/settings/webhook/settings.tmpl#L25 * Field translations: https://github.com/go-gitea/gitea/blob/main/options/locale/locale_en-US.ini (descriptions of what the event does) * The struct `HookEvents`: https://github.com/go-gitea/gitea/blob/main/models/webhook/webhook.go#L122 (which seems to contain the json name of the hook that probably appears in the payload).
Author
Owner

@jolheiser commented on GitHub (Nov 22, 2022):

You could also take a look at https://gitea.com/jolheiser/gitea-webhook where I had done a little work to get this started.

Admittedly I meet to rerun, as they are a bit out of date, but it should be a good start.

I'll try to get them updated soon. Updated them this morning. 🙂

@jolheiser commented on GitHub (Nov 22, 2022): You could also take a look at https://gitea.com/jolheiser/gitea-webhook where I had done a little work to get this started. Admittedly I meet to rerun, as they are a bit out of date, but it should be a good start. ~~I'll try to get them updated soon.~~ Updated them this morning. 🙂
Author
Owner

@ghost commented on GitHub (Feb 24, 2024):

It's funny how there's still no proper documentation in web hooks after so much time. Thanks @Timoses andd @jolheiser you help me big time.

@ghost commented on GitHub (Feb 24, 2024): It's funny how there's still no proper documentation in web hooks after so much time. Thanks @Timoses andd @jolheiser you help me big time.
Author
Owner

@Lucifergene commented on GitHub (Jun 4, 2024):

This is the list of all Hook Events Types directly from their codebase:
https://github.com/go-gitea/gitea/blob/main/modules/webhook/type.go#L6

Till @lunny updates the docs, here is the list:

	HookEventCreate                    HookEventType = "create"
	HookEventDelete                    HookEventType = "delete"
	HookEventFork                      HookEventType = "fork"
	HookEventPush                      HookEventType = "push"
	HookEventIssues                    HookEventType = "issues"
	HookEventIssueAssign               HookEventType = "issue_assign"
	HookEventIssueLabel                HookEventType = "issue_label"
	HookEventIssueMilestone            HookEventType = "issue_milestone"
	HookEventIssueComment              HookEventType = "issue_comment"
	HookEventPullRequest               HookEventType = "pull_request"
	HookEventPullRequestAssign         HookEventType = "pull_request_assign"
	HookEventPullRequestLabel          HookEventType = "pull_request_label"
	HookEventPullRequestMilestone      HookEventType = "pull_request_milestone"
	HookEventPullRequestComment        HookEventType = "pull_request_comment"
	HookEventPullRequestReviewApproved HookEventType = "pull_request_review_approved"
	HookEventPullRequestReviewRejected HookEventType = "pull_request_review_rejected"
	HookEventPullRequestReviewComment  HookEventType = "pull_request_review_comment"
	HookEventPullRequestSync           HookEventType = "pull_request_sync"
	HookEventPullRequestReviewRequest  HookEventType = "pull_request_review_request"
	HookEventWiki                      HookEventType = "wiki"
	HookEventRepository                HookEventType = "repository"
	HookEventRelease                   HookEventType = "release"
	HookEventPackage                   HookEventType = "package"
	HookEventSchedule                  HookEventType = "schedule"
@Lucifergene commented on GitHub (Jun 4, 2024): This is the list of all Hook Events Types directly from their codebase: https://github.com/go-gitea/gitea/blob/main/modules/webhook/type.go#L6 Till @lunny updates the docs, here is the list: ``` HookEventCreate HookEventType = "create" HookEventDelete HookEventType = "delete" HookEventFork HookEventType = "fork" HookEventPush HookEventType = "push" HookEventIssues HookEventType = "issues" HookEventIssueAssign HookEventType = "issue_assign" HookEventIssueLabel HookEventType = "issue_label" HookEventIssueMilestone HookEventType = "issue_milestone" HookEventIssueComment HookEventType = "issue_comment" HookEventPullRequest HookEventType = "pull_request" HookEventPullRequestAssign HookEventType = "pull_request_assign" HookEventPullRequestLabel HookEventType = "pull_request_label" HookEventPullRequestMilestone HookEventType = "pull_request_milestone" HookEventPullRequestComment HookEventType = "pull_request_comment" HookEventPullRequestReviewApproved HookEventType = "pull_request_review_approved" HookEventPullRequestReviewRejected HookEventType = "pull_request_review_rejected" HookEventPullRequestReviewComment HookEventType = "pull_request_review_comment" HookEventPullRequestSync HookEventType = "pull_request_sync" HookEventPullRequestReviewRequest HookEventType = "pull_request_review_request" HookEventWiki HookEventType = "wiki" HookEventRepository HookEventType = "repository" HookEventRelease HookEventType = "release" HookEventPackage HookEventType = "package" HookEventSchedule HookEventType = "schedule" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9693