...
1 package prproject
2
3 import (
4 "github.com/google/go-github/v47/github"
5
6 "edge-infra.dev/pkg/f8n/devinfra/jack/constants"
7 "edge-infra.dev/pkg/f8n/devinfra/jack/plugin"
8 )
9
10 func init() {
11 plugin.RegisterPullRequestHandler(constants.PluginPRProject, handlePR)
12 }
13
14 func handlePR(hp plugin.HandlerParams, pre github.PullRequestEvent) {
15 hp.Log.WithName(constants.PluginPRProject)
16 action := pre.GetAction()
17 switch action {
18 case "closed":
19 addPRToProjects(hp, pre)
20 }
21 }
22
View as plain text