Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
c19ac41b34
commit
9a929ad17f
1 changed files with 10 additions and 0 deletions
|
@ -354,6 +354,16 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
defer baseGitRepo.Close()
|
defer baseGitRepo.Close()
|
||||||
|
|
||||||
|
if !baseGitRepo.IsBranchExist(pull.BaseBranch) {
|
||||||
|
ctx.Data["IsPullRequestBroken"] = true
|
||||||
|
ctx.Data["BaseTarget"] = pull.BaseBranch
|
||||||
|
ctx.Data["HeadTarget"] = pull.HeadBranch
|
||||||
|
ctx.Data["NumCommits"] = 0
|
||||||
|
ctx.Data["NumFiles"] = 0
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var headBranchExist bool
|
var headBranchExist bool
|
||||||
var headBranchSha string
|
var headBranchSha string
|
||||||
// HeadRepo may be missing
|
// HeadRepo may be missing
|
||||||
|
|
Reference in a new issue