def getProposals(self):
     """Get the proposals for the view."""
     collection = IBranchCollection(self.context)
     collection = collection.visibleByUser(self.user)
     proposals = collection.getMergeProposals(
         [BranchMergeProposalStatus.CODE_APPROVED, BranchMergeProposalStatus.NEEDS_REVIEW], eager_load=True
     )
     return proposals
Exemple #2
0
 def getProposals(self):
     """Get the proposals for the view."""
     collection = IBranchCollection(self.context)
     collection = collection.visibleByUser(self.user)
     proposals = collection.getMergeProposals([
         BranchMergeProposalStatus.CODE_APPROVED,
         BranchMergeProposalStatus.NEEDS_REVIEW
     ],
                                              eager_load=True)
     return proposals
    def getMergeProposals(self, status=None, visible_by_user=None,
                          eager_load=False):
        """See `IHasMergeProposals`."""
        if not status:
            status = (
                BranchMergeProposalStatus.CODE_APPROVED,
                BranchMergeProposalStatus.NEEDS_REVIEW,
                BranchMergeProposalStatus.WORK_IN_PROGRESS)

        collection = IBranchCollection(self).visibleByUser(visible_by_user)
        return collection.getMergeProposals(status, eager_load=eager_load)
    def getMergeProposals(self,
                          status=None,
                          visible_by_user=None,
                          eager_load=False):
        """See `IHasMergeProposals`."""
        if not status:
            status = (BranchMergeProposalStatus.CODE_APPROVED,
                      BranchMergeProposalStatus.NEEDS_REVIEW,
                      BranchMergeProposalStatus.WORK_IN_PROGRESS)

        collection = IBranchCollection(self).visibleByUser(visible_by_user)
        return collection.getMergeProposals(status, eager_load=eager_load)