From 7f65339fffaf6d051338ee399bfe439234ce70a0 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 28 Aug 2013 21:36:09 +0300 Subject: [PATCH] Fix s500 when press ervice test button --- app/services/git_push_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index 9584f42..f9d43e6 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -59,8 +59,8 @@ class GitPushService # def sample_data(project, user) @project, @user = project, user - commits = project.repository.commits(project.default_branch, nil, 3) - post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}") + @push_commits = project.repository.commits(project.default_branch, nil, 3) + post_receive_data(@push_commits.last.id, @push_commits.first.id, "refs/heads/#{project.default_branch}") end protected -- libgit2 0.21.2