{{ define "repo/pulls/fragments/pullActions" }} {{ $lastIdx := sub (len .Pull.Submissions) 1 }} {{ $roundNumber := .RoundNumber }} {{ $stack := .Stack }} {{ $totalPulls := sub 0 1 }} {{ $below := sub 0 1 }} {{ $stackCount := "" }} {{ if .Pull.IsStacked }} {{ $totalPulls = len $stack }} {{ $below = $stack.Below .Pull }} {{ $mergeable := len $below.Mergeable }} {{ $stackCount = printf "%d/%d" $mergeable $totalPulls }} {{ end }} {{ $isPushAllowed := .RepoInfo.Roles.IsPushAllowed }} {{ $isMerged := .Pull.State.IsMerged }} {{ $isClosed := .Pull.State.IsClosed }} {{ $isOpen := .Pull.State.IsOpen }} {{ $isConflicted := and .MergeCheck (or .MergeCheck.Error .MergeCheck.IsConflicted) }} {{ $isPullAuthor := and .LoggedInUser (eq .LoggedInUser.Did .Pull.OwnerDid) }} {{ $isLastRound := eq $roundNumber $lastIdx }} {{ $isSameRepoBranch := .Pull.IsBranchBased }} {{ $isUpToDate := .ResubmitCheck.No }}