Changeset - 4cca6590f263
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 5 years ago 2020-11-05 23:04:52
thomas.de_schampheleire@nokia.com
model/comment: drop unused fields in email_kwargs

Keep things as simple as possible.
1 file changed with 0 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/model/comment.py
Show inline comments
 
@@ -82,21 +82,19 @@ class ChangesetCommentsModel(object):
 
            email_kwargs = {
 
                'status_change': status_change,
 
                'cs_comment_user': author.full_name_and_username,
 
                'cs_target_repo': webutils.canonical_url('summary_home', repo_name=repo.repo_name),
 
                'cs_comment_url': comment_url,
 
                'cs_url': webutils.canonical_url('changeset_home', repo_name=repo.repo_name, revision=revision),
 
                'raw_id': revision,
 
                'message': cs.message,
 
                'message_short': shorter(cs.message, 50, firstline=True),
 
                'cs_author': cs_author,
 
                'cs_author_username': cs_author.username,
 
                'repo_name': repo.repo_name,
 
                'short_id': revision[:12],
 
                'branch': cs.branch,
 
                'comment_username': author.username,
 
                'threading': threading,
 
            }
 
        # pull request
 
        elif pull_request:
 
            notification_type = notification.NotificationModel.TYPE_PULL_REQUEST_COMMENT
 
            _org_ref_type, org_ref_name, _org_rev = comment.pull_request.org_ref.split(':')
 
@@ -131,13 +129,12 @@ class ChangesetCommentsModel(object):
 
                'pr_source_repo': webutils.canonical_url('summary_home',
 
                                   repo_name=pull_request.org_repo.repo_name),
 
                'pr_source_branch': org_ref_name,
 
                'pr_owner': pull_request.owner,
 
                'pr_owner_username': pull_request.owner.username,
 
                'repo_name': pull_request.other_repo.repo_name,
 
                'comment_username': author.username,
 
                'threading': threading,
 
            }
 

	
 
        email_kwargs['is_mention'] = False
 
        # create notification objects, and emails
 
        notification.NotificationModel().create(
0 comments (0 inline, 0 general)