37 lines
779 B
Go
37 lines
779 B
Go
|
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
|
||
|
*/
|
||
|
}
|
||
|
|