fix pull comments
This commit is contained in:
parent
0911103ea1
commit
0b9795fabd
|
@ -1,12 +1,15 @@
|
|||
commentService = ($http) ->
|
||||
getPath = (kind, project, commentable, id) ->
|
||||
if (kind is 'remove' or kind is 'update') and commentable.kind is 'issue'
|
||||
if commentable.kind is 'issue' or commentable.kind is 'pull'
|
||||
if kind is 'remove' or kind is 'update'
|
||||
return Routes.project_issue_comment_path(project, commentable.id, id)
|
||||
else if kind is 'add' and commentable.kind is 'issue'
|
||||
else if kind is 'add'
|
||||
return Routes.project_issue_comments_path(project, commentable.id)
|
||||
else if (kind is 'remove' or kind is 'update') and commentable.kind is 'commit'
|
||||
|
||||
else if commentable.kind is 'commit'
|
||||
if kind is 'remove' or kind is 'update'
|
||||
return Routes.project_commit_comment_path(project, commentable.id, id)
|
||||
else if kind is 'add' and commentable.kind is 'commit'
|
||||
else if kind is 'add'
|
||||
return Routes.project_commit_comments_path(project, commentable.id)
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue