summaryrefslogtreecommitdiff
path: root/app/models/event.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-16 23:12:52 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-16 23:12:52 +0300
commit132caae73446e23a2ff8a7b1a4110efe42a36eb1 (patch)
treede590a467bfcc61a701d35a3b2acf774e6c07db4 /app/models/event.rb
parenta165a0b23fd6cc81e7fc0163827310f69ce0399a (diff)
downloadgitlab-ce-132caae73446e23a2ff8a7b1a4110efe42a36eb1.tar.gz
Move repo tags to own controller. add ability to remove tags
Diffstat (limited to 'app/models/event.rb')
-rw-r--r--app/models/event.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 50c87f84655..3ed2a6aa765 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -55,13 +55,13 @@ class Event < ActiveRecord::Base
end
end
- def create_rm_branch(project, user, branch)
+ def create_rm_ref(project, user, ref, prefix = 'refs/heads')
Event.create(
project: project,
action: Event::PUSHED,
data: {
- ref: branch.name,
- before: branch.commit.id,
+ ref: "#{prefix}/#{ref.name}",
+ before: ref.commit.id,
after: '00000000'
},
author_id: user.id