comparison kallithea/model/comment.py @ 8757:4cca6590f263

model/comment: drop unused fields in email_kwargs Keep things as simple as possible.
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Thu, 05 Nov 2020 23:04:52 +0100
parents b4749d02192d
children 3cef2caf44f3
comparison
equal deleted inserted replaced
8756:b4749d02192d 8757:4cca6590f263
83 'status_change': status_change, 83 'status_change': status_change,
84 'cs_comment_user': author.full_name_and_username, 84 'cs_comment_user': author.full_name_and_username,
85 'cs_target_repo': webutils.canonical_url('summary_home', repo_name=repo.repo_name), 85 'cs_target_repo': webutils.canonical_url('summary_home', repo_name=repo.repo_name),
86 'cs_comment_url': comment_url, 86 'cs_comment_url': comment_url,
87 'cs_url': webutils.canonical_url('changeset_home', repo_name=repo.repo_name, revision=revision), 87 'cs_url': webutils.canonical_url('changeset_home', repo_name=repo.repo_name, revision=revision),
88 'raw_id': revision,
89 'message': cs.message, 88 'message': cs.message,
90 'message_short': shorter(cs.message, 50, firstline=True), 89 'message_short': shorter(cs.message, 50, firstline=True),
91 'cs_author': cs_author, 90 'cs_author': cs_author,
92 'cs_author_username': cs_author.username, 91 'cs_author_username': cs_author.username,
93 'repo_name': repo.repo_name, 92 'repo_name': repo.repo_name,
94 'short_id': revision[:12], 93 'short_id': revision[:12],
95 'branch': cs.branch, 94 'branch': cs.branch,
96 'comment_username': author.username,
97 'threading': threading, 95 'threading': threading,
98 } 96 }
99 # pull request 97 # pull request
100 elif pull_request: 98 elif pull_request:
101 notification_type = notification.NotificationModel.TYPE_PULL_REQUEST_COMMENT 99 notification_type = notification.NotificationModel.TYPE_PULL_REQUEST_COMMENT
132 repo_name=pull_request.org_repo.repo_name), 130 repo_name=pull_request.org_repo.repo_name),
133 'pr_source_branch': org_ref_name, 131 'pr_source_branch': org_ref_name,
134 'pr_owner': pull_request.owner, 132 'pr_owner': pull_request.owner,
135 'pr_owner_username': pull_request.owner.username, 133 'pr_owner_username': pull_request.owner.username,
136 'repo_name': pull_request.other_repo.repo_name, 134 'repo_name': pull_request.other_repo.repo_name,
137 'comment_username': author.username,
138 'threading': threading, 135 'threading': threading,
139 } 136 }
140 137
141 email_kwargs['is_mention'] = False 138 email_kwargs['is_mention'] = False
142 # create notification objects, and emails 139 # create notification objects, and emails