##// END OF EJS Templates
mock changeset status(to under review) if there's opened pull request but not yet with a status
marcink -
r2542:4496d311 beta
parent child Browse files
Show More
@@ -844,6 +844,16 b' class Repository(Base, BaseModel):'
844 if revisions:
844 if revisions:
845 statuses = statuses.filter(ChangesetStatus.revision.in_(revisions))
845 statuses = statuses.filter(ChangesetStatus.revision.in_(revisions))
846 grouped = {}
846 grouped = {}
847
848 #maybe we have open new pullrequest without a status ?
849 stat = ChangesetStatus.STATUS_UNDER_REVIEW
850 status_lbl = ChangesetStatus.get_status_lbl(stat)
851 for pr in PullRequest.query().filter(PullRequest.org_repo == self).all():
852 for rev in pr.revisions:
853 pr_id = pr.pull_request_id
854 pr_repo = pr.other_repo.repo_name
855 grouped[rev] = [stat, status_lbl, pr_id, pr_repo]
856
847 for stat in statuses.all():
857 for stat in statuses.all():
848 pr_id = pr_repo = None
858 pr_id = pr_repo = None
849 if stat.pull_request:
859 if stat.pull_request:
General Comments 0
You need to be logged in to leave comments. Login now