Show More
@@ -125,7 +125,17 b' class CommentsModel(BaseModel):' | |||||
125 |
|
125 | |||
126 | return comment_versions |
|
126 | return comment_versions | |
127 |
|
127 | |||
128 |
def get_unresolved_todos(self, |
|
128 | def get_repository_unresolved_todos(self, repo): | |
|
129 | todos = Session().query(ChangesetComment) \ | |||
|
130 | .filter(ChangesetComment.repo == repo) \ | |||
|
131 | .filter(ChangesetComment.resolved_by == None) \ | |||
|
132 | .filter(ChangesetComment.comment_type | |||
|
133 | == ChangesetComment.COMMENT_TYPE_TODO) | |||
|
134 | todos = todos.all() | |||
|
135 | ||||
|
136 | return todos | |||
|
137 | ||||
|
138 | def get_pull_request_unresolved_todos(self, pull_request, show_outdated=True): | |||
129 |
|
139 | |||
130 | todos = Session().query(ChangesetComment) \ |
|
140 | todos = Session().query(ChangesetComment) \ | |
131 | .filter(ChangesetComment.pull_request == pull_request) \ |
|
141 | .filter(ChangesetComment.pull_request == pull_request) \ |
@@ -1639,7 +1639,7 b' class MergeCheck(object):' | |||||
1639 | return merge_check |
|
1639 | return merge_check | |
1640 |
|
1640 | |||
1641 | # left over TODOs |
|
1641 | # left over TODOs | |
1642 | todos = CommentsModel().get_unresolved_todos(pull_request) |
|
1642 | todos = CommentsModel().get_pull_request_unresolved_todos(pull_request) | |
1643 | if todos: |
|
1643 | if todos: | |
1644 | log.debug("MergeCheck: cannot merge, {} " |
|
1644 | log.debug("MergeCheck: cannot merge, {} " | |
1645 | "unresolved TODOs left.".format(len(todos))) |
|
1645 | "unresolved TODOs left.".format(len(todos))) |
General Comments 0
You need to be logged in to leave comments.
Login now