autogits/workflow-pr/pr_closed.go
2024-11-08 16:36:05 +01:00

39 lines
800 B
Go

package main
import (
"log"
"src.opensuse.org/autogits/common"
)
type PullRequestClosed struct {
gitea common.Gitea
}
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
*/
}