##// END OF EJS Templates
comments: changed signature of create method of ChangesetComment....
marcink -
r1322:50f14062 default
parent child Browse files
Show More
@@ -1437,7 +1437,7 b' def comment_commit('
1437 renderer = rc_config.get('rhodecode_markup_renderer', 'rst')
1437 renderer = rc_config.get('rhodecode_markup_renderer', 'rst')
1438 status_change_label = ChangesetStatus.get_status_lbl(status)
1438 status_change_label = ChangesetStatus.get_status_lbl(status)
1439 comm = ChangesetCommentsModel().create(
1439 comm = ChangesetCommentsModel().create(
1440 message, repo, user, revision=commit_id,
1440 message, repo, user, commit_id=commit_id,
1441 status_change=status_change_label,
1441 status_change=status_change_label,
1442 status_change_type=status,
1442 status_change_type=status,
1443 renderer=renderer)
1443 renderer=renderer)
@@ -350,7 +350,7 b' class ChangesetController(BaseRepoContro'
350 text=text,
350 text=text,
351 repo=c.rhodecode_db_repo.repo_id,
351 repo=c.rhodecode_db_repo.repo_id,
352 user=c.rhodecode_user.user_id,
352 user=c.rhodecode_user.user_id,
353 revision=current_id,
353 commit_id=current_id,
354 f_path=request.POST.get('f_path'),
354 f_path=request.POST.get('f_path'),
355 line_no=request.POST.get('line'),
355 line_no=request.POST.get('line'),
356 status_change=(ChangesetStatus.get_status_lbl(status)
356 status_change=(ChangesetStatus.get_status_lbl(status)
@@ -81,8 +81,8 b' class ChangesetCommentsModel(BaseModel):'
81 log.error(traceback.format_exc())
81 log.error(traceback.format_exc())
82 return global_renderer
82 return global_renderer
83
83
84 def create(self, text, repo, user, revision=None, pull_request=None,
84 def create(self, text, repo, user, commit_id=None, pull_request=None,
85 f_path=None, line_no=None, status_change=None,
85 f_path=None, line_no=None, status_change=None, comment_type=None,
86 status_change_type=None, closing_pr=False,
86 status_change_type=None, closing_pr=False,
87 send_email=True, renderer=None):
87 send_email=True, renderer=None):
88 """
88 """
@@ -93,14 +93,16 b' class ChangesetCommentsModel(BaseModel):'
93 :param text:
93 :param text:
94 :param repo:
94 :param repo:
95 :param user:
95 :param user:
96 :param revision:
96 :param commit_id:
97 :param pull_request:
97 :param pull_request:
98 :param f_path:
98 :param f_path:
99 :param line_no:
99 :param line_no:
100 :param status_change: Label for status change
100 :param status_change: Label for status change
101 :param comment_type: Type of comment
101 :param status_change_type: type of status change
102 :param status_change_type: type of status change
102 :param closing_pr:
103 :param closing_pr:
103 :param send_email:
104 :param send_email:
105 :param renderer: pick renderer for this comment
104 """
106 """
105 if not text:
107 if not text:
106 log.warning('Missing text for comment, skipping...')
108 log.warning('Missing text for comment, skipping...')
@@ -119,8 +121,6 b' class ChangesetCommentsModel(BaseModel):'
119 comment.f_path = f_path
121 comment.f_path = f_path
120 comment.line_no = line_no
122 comment.line_no = line_no
121
123
122 #TODO (marcink): fix this and remove revision as param
123 commit_id = revision
124 pull_request_id = pull_request
124 pull_request_id = pull_request
125
125
126 commit_obj = None
126 commit_obj = None
General Comments 0
You need to be logged in to leave comments. Login now