##// END OF EJS Templates
todos: all todos needs to be resolved for merge to happen....
marcink -
r1342:44fc3039 default
parent child Browse files
Show More
@@ -129,15 +129,20 b' class CommentsModel(BaseModel):'
129
129
130 return comment_versions
130 return comment_versions
131
131
132 def get_unresolved_todos(self, pull_request):
132 def get_unresolved_todos(self, pull_request, show_outdated=True):
133
133
134 todos = Session().query(ChangesetComment) \
134 todos = Session().query(ChangesetComment) \
135 .filter(ChangesetComment.pull_request == pull_request) \
135 .filter(ChangesetComment.pull_request == pull_request) \
136 .filter(ChangesetComment.resolved_by == None) \
136 .filter(ChangesetComment.resolved_by == None) \
137 .filter(ChangesetComment.comment_type
137 .filter(ChangesetComment.comment_type
138 == ChangesetComment.COMMENT_TYPE_TODO) \
138 == ChangesetComment.COMMENT_TYPE_TODO)
139 .filter(coalesce(ChangesetComment.display_state, '') !=
139
140 ChangesetComment.COMMENT_OUTDATED).all()
140 if not show_outdated:
141 todos = todos.filter(
142 coalesce(ChangesetComment.display_state, '') !=
143 ChangesetComment.COMMENT_OUTDATED)
144
145 todos = todos.all()
141
146
142 return todos
147 return todos
143
148
General Comments 0
You need to be logged in to leave comments. Login now