Continue refactoring. Use repostory and team
This commit is contained in:
parent
39ba934c0a
commit
dccd8b6eaa
42 changed files with 219 additions and 179 deletions
|
@ -9,7 +9,7 @@ module Notes
|
|||
|
||||
@notes = case target_type
|
||||
when "commit"
|
||||
project.commit_notes(project.commit(target_id)).fresh.limit(20)
|
||||
project.commit_notes(project.repository.commit(target_id)).fresh.limit(20)
|
||||
when "issue"
|
||||
project.issues.find(target_id).notes.inc_author.fresh.limit(20)
|
||||
when "merge_request"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class TestHookContext < BaseContext
|
||||
def execute
|
||||
hook = project.hooks.find(params[:id])
|
||||
commits = project.commits(project.default_branch, nil, 3)
|
||||
commits = project.repository.commits(project.default_branch, nil, 3)
|
||||
data = project.post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}", current_user)
|
||||
hook.execute(data)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue