34 lines
816 B
Go
34 lines
816 B
Go
package main
|
|
|
|
import (
|
|
"src.opensuse.org/autogits/common"
|
|
)
|
|
|
|
type PullRequestClosed struct{}
|
|
|
|
func (*PullRequestClosed) Process(req *common.PullRequestWebhookEvent, git common.Git, config *common.AutogitConfig) error {
|
|
_, gitPrjRepo, _ := config.GetPrjGit()
|
|
if req.Pull_Request.Base.Repo.Name != gitPrjRepo {
|
|
return nil
|
|
}
|
|
|
|
common.LogInfo(req.Pull_Request.Url, "is", req.Pull_Request.State)
|
|
return nil
|
|
/*
|
|
req := h.Data.(*common.PullRequestAction)
|
|
|
|
if req.Repository.Name != common.DefaultGitPrj {
|
|
// we only handle project git PR updates here
|
|
return nil
|
|
}
|
|
|
|
if err := fetchPrGit(h, req.Pull_Request); err != nil {
|
|
return err
|
|
}
|
|
|
|
headSubmodules := h.GitSubmoduleList(dir, pr.Head.Sha)
|
|
baseSubmodules := h.GitSubmoduleList(dir, pr.Base.Sha)
|
|
return nil
|
|
*/
|
|
}
|