autogits/workflow-pr/pr_closed.go

37 lines
779 B
Go
Raw Normal View History

2024-11-07 18:25:35 +01:00
package main
import (
"log"
"src.opensuse.org/autogits/common"
)
type PullRequestClosed struct {}
func (*PullRequestClosed) Process(req *common.PullRequestWebhookEvent, git *common.GitHandler, config *common.AutogitConfig) error {
if req.Repository.Name != config.GitProjectName {
return nil
}
log.Println("request was:", 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
*/
}