2024-11-07 18:25:35 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"src.opensuse.org/autogits/common"
|
|
|
|
)
|
|
|
|
|
2024-11-08 16:08:53 +01:00
|
|
|
type PullRequestClosed struct {
|
|
|
|
gitea common.Gitea
|
|
|
|
}
|
2024-11-07 18:25:35 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|