Skip to content

Commit e9470cb

Browse files
authored
Fix GitLab webhook event Project field typo (#152)
Fix the json field name of `Project` in GitLab's `PushEventPayload` and `TagEventPayload`. The json field name should be lowercase `project` according to https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#push-events.
1 parent f8c31d0 commit e9470cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitlab/payload.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ type PushEventPayload struct {
7474
UserEmail string `json:"user_email"`
7575
UserAvatar string `json:"user_avatar"`
7676
ProjectID int64 `json:"project_id"`
77-
Project Project `json:"Project"`
77+
Project Project `json:"project"`
7878
Repository Repository `json:"repository"`
7979
Commits []Commit `json:"commits"`
8080
TotalCommitsCount int64 `json:"total_commits_count"`
@@ -92,7 +92,7 @@ type TagEventPayload struct {
9292
UserUsername string `json:"user_username"`
9393
UserAvatar string `json:"user_avatar"`
9494
ProjectID int64 `json:"project_id"`
95-
Project Project `json:"Project"`
95+
Project Project `json:"project"`
9696
Repository Repository `json:"repository"`
9797
Commits []Commit `json:"commits"`
9898
TotalCommitsCount int64 `json:"total_commits_count"`

0 commit comments

Comments
 (0)