PR: fix type errors
This commit is contained in:
@@ -152,12 +152,7 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p := common.PullRequestWebhookEvent{
|
if err = ProcesPullRequest(pr, configs); err != nil {
|
||||||
Action: "opened",
|
|
||||||
Number: num,
|
|
||||||
Pull_Request: common.PullRequestFromModel(pr),
|
|
||||||
}
|
|
||||||
if err = ProcesPullRequest(&p, configs); err != nil {
|
|
||||||
common.LogError("processor returned error", err)
|
common.LogError("processor returned error", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,16 +43,7 @@ func pullRequestToEventState(state models.StateType) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *DefaultStateChecker) ProcessPR(pr *models.PullRequest, config *common.AutogitConfig) error {
|
func (s *DefaultStateChecker) ProcessPR(pr *models.PullRequest, config *common.AutogitConfig) error {
|
||||||
var event common.PullRequestWebhookEvent
|
return ProcesPullRequest(pr, common.AutogitConfigs{config})
|
||||||
|
|
||||||
event.Pull_Request = common.PullRequestFromModel(pr)
|
|
||||||
event.Action = pullRequestToEventState(pr.State)
|
|
||||||
event.Number = pr.Index
|
|
||||||
event.Repository = common.RepositoryFromModel(pr.Base.Repo)
|
|
||||||
event.Sender = *common.UserFromModel(pr.User)
|
|
||||||
event.Requested_reviewer = nil
|
|
||||||
|
|
||||||
return ProcesPullRequest(&event, common.AutogitConfigs{config})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func PrjGitSubmoduleCheck(config *common.AutogitConfig, git common.Git, repo string, submodules map[string]string) (prsToProcess []*interfaces.PRToProcess, err error) {
|
func PrjGitSubmoduleCheck(config *common.AutogitConfig, git common.Git, repo string, submodules map[string]string) (prsToProcess []*interfaces.PRToProcess, err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user