Skip to content

Commit fde2a1b

Browse files
Update the case of Push eventType to push in Gitlab
Fixes: #1973 Signed-off-by: PuneetPunamiya <ppunamiy@redhat.com>
1 parent cc30250 commit fde2a1b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/provider/gitlab/parse_payload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func (v *Provider) ParsePayload(_ context.Context, _ *params.Run, request *http.
129129
v.userID = gitEvent.UserID
130130
processedEvent.SourceProjectID = gitEvent.ProjectID
131131
processedEvent.TargetProjectID = gitEvent.ProjectID
132-
processedEvent.EventType = strings.ReplaceAll(event, " Hook", "")
132+
processedEvent.EventType = strings.ToLower(strings.ReplaceAll(event, " Hook", ""))
133133
case *gitlab.MergeCommentEvent:
134134
processedEvent.Sender = gitEvent.User.Username
135135
processedEvent.DefaultBranch = gitEvent.Project.DefaultBranch

pkg/provider/gitlab/parse_payload_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func TestParsePayload(t *testing.T) {
106106
payload: sample.PushEventAsJSON(true),
107107
},
108108
want: &info.Event{
109-
EventType: "Push",
109+
EventType: "push",
110110
TriggerTarget: "push",
111111
Organization: "hello/this/is/me/ze",
112112
Repository: "project",

0 commit comments

Comments
 (0)