forked from tangled.org/core
this repo has no description

appview: pulls: fix merge check on stacked PRs

this was incorrectly adding the current pull into the formatpatch twice.

Signed-off-by: oppiliappan <me@oppi.li>

Changed files
+1 -3
appview
pulls
+1 -3
appview/pulls/pulls.go
···
patch := pull.LatestPatch()
if pull.IsStacked() {
// combine patches of substack
-
subStack := stack.Below(pull)
+
subStack := stack.StrictlyBelow(pull)
// collect the portion of the stack that is mergeable
mergeable := subStack.Mergeable()
// combine each patch
···
top := stack[0]
latestSourceRev = top.Submissions[top.LastRoundNumber()].SourceRev
}
-
-
log.Println(latestSourceRev, result.Branch.Hash)
if latestSourceRev != result.Branch.Hash {
return pages.ShouldResubmit