summaryrefslogtreecommitdiff
path: root/app/contexts
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-04 08:43:25 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-04 08:43:25 +0200
commitdccd8b6eaa8b2e98b0245262a8e39df8fb8ae634 (patch)
tree541a40fb2e84b24ab0c4ae39fa18b1b720e5d7c2 /app/contexts
parent39ba934c0a65f571214998e056e925b61f389360 (diff)
downloadgitlab-ce-dccd8b6eaa8b2e98b0245262a8e39df8fb8ae634.tar.gz
Continue refactoring. Use repostory and team
Diffstat (limited to 'app/contexts')
-rw-r--r--app/contexts/notes/load_context.rb2
-rw-r--r--app/contexts/test_hook_context.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/contexts/notes/load_context.rb b/app/contexts/notes/load_context.rb
index 05626c31a25..907c7c7ade2 100644
--- a/app/contexts/notes/load_context.rb
+++ b/app/contexts/notes/load_context.rb
@@ -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"
diff --git a/app/contexts/test_hook_context.rb b/app/contexts/test_hook_context.rb
index cba5d1f87c2..d2d82a52cf5 100644
--- a/app/contexts/test_hook_context.rb
+++ b/app/contexts/test_hook_context.rb
@@ -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