Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-27 01:04:14 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-27 01:04:14 +0400
commit0cf0487d65a482b1e9d8dfe69899e333216a387c (patch)
tree05b00ddc7892a0387cfb7e68f90ff65a0765d172 /app/services/git_push_service.rb
parent4e5164338a77894c68816bc1e7eec018aea8301c (diff)
Fix TestHookContext
Diffstat (limited to 'app/services/git_push_service.rb')
-rw-r--r--app/services/git_push_service.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index 55cf31cd8f8..40d57c67573 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -31,6 +31,16 @@ class GitPushService
create_push_event
end
+ # This method provide a sample data
+ # generated with post_receive_data method
+ # for given project
+ #
+ 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}")
+ end
+
protected
def create_push_event