Skip to content

Commit f838ef0

Browse files
committed
Make subscription from comment use the reponame from the comment
Until now it used the path to determine the repository.
1 parent 3e2fcf0 commit f838ef0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

code_comments/subscription.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,13 @@ def from_comment(cls, env, comment, user=None, notify=True):
236236

237237
# Munge changesets and browser
238238
if comment.type in ('changeset', 'browser'):
239-
rm = RepositoryManager(env)
240-
reponame, repos, path = rm.get_repository_by_path(comment.path)
241239
if comment.type == 'browser':
242-
sub['path'] = path
240+
sub['path'] = comment.path
243241
else:
244242
sub['path'] = ''
245-
sub['repos'] = reponame or '(default)'
243+
sub['repos'] = comment.reponame
244+
rm = RepositoryManager(env)
245+
repos = rm.get_repository(comment.reponame)
246246
try:
247247
_cs = repos.get_changeset(comment.revision)
248248
except NoSuchChangeset:

0 commit comments

Comments
 (0)