diff --git a/cloudevents-server/pkg/events/custom/tibuild/handler.go b/cloudevents-server/pkg/events/custom/tibuild/handler.go index 2e16c3b..a23edae 100644 --- a/cloudevents-server/pkg/events/custom/tibuild/handler.go +++ b/cloudevents-server/pkg/events/custom/tibuild/handler.go @@ -38,8 +38,10 @@ func (h *triggerHandler) SupportEventTypes() []string { return []string{ EventTypeDevbuildFakeGithubCreate, EventTypeDevbuildFakeGithubPush, + EventTypeDevbuildFakeGithubPullRequest, EventTypeHotfixFakeGithubCreate, EventTypeHotfixFakeGithubPush, + EventTypeHotfixFakeGithubPullRequest, } } diff --git a/cloudevents-server/pkg/events/custom/tibuild/types.go b/cloudevents-server/pkg/events/custom/tibuild/types.go index 7fdbc17..29f9d60 100644 --- a/cloudevents-server/pkg/events/custom/tibuild/types.go +++ b/cloudevents-server/pkg/events/custom/tibuild/types.go @@ -1,8 +1,10 @@ package tibuild const ( - EventTypeDevbuildFakeGithubPush = "net.pingcap.tibuild.devbuild.push" // Fake GitHub push events in the development build. - EventTypeDevbuildFakeGithubCreate = "net.pingcap.tibuild.devbuild.create" // Fake GitHub create events in the development build. - EventTypeHotfixFakeGithubPush = "net.pingcap.tibuild.hotfix.push" // Fake GitHub push events in the hotfix build. - EventTypeHotfixFakeGithubCreate = "net.pingcap.tibuild.hotfix.create" // Fake GitHub create events in the hotfix build. + EventTypeDevbuildFakeGithubPush = "net.pingcap.tibuild.devbuild.push" // Fake GitHub push events in the development build. + EventTypeDevbuildFakeGithubCreate = "net.pingcap.tibuild.devbuild.create" // Fake GitHub create events in the development build. + EventTypeDevbuildFakeGithubPullRequest = "net.pingcap.tibuild.devbuild.pull_request" // Fake GitHub pull request events in the development build. + EventTypeHotfixFakeGithubPush = "net.pingcap.tibuild.hotfix.push" // Fake GitHub push events in the hotfix build. + EventTypeHotfixFakeGithubCreate = "net.pingcap.tibuild.hotfix.create" // Fake GitHub create events in the hotfix build. + EventTypeHotfixFakeGithubPullRequest = "net.pingcap.tibuild.hotfix.pull_request" // Fake GitHub pull request events in the hotfix build. ) diff --git a/tibuild/pkg/rest/service/dev_build_service.go b/tibuild/pkg/rest/service/dev_build_service.go index 8ce6c7e..47ddc29 100644 --- a/tibuild/pkg/rest/service/dev_build_service.go +++ b/tibuild/pkg/rest/service/dev_build_service.go @@ -102,7 +102,7 @@ func (s DevbuildServer) Create(ctx context.Context, req DevBuild, option DevBuil if err != nil { slog.Error("save triggered entity failed", "reason", err) } - return nil, fmt.Errorf("trigger jenkins fail: %w", ErrInternalError) + return nil, fmt.Errorf("trigger Tekton fail: %w", ErrInternalError) } }