Polishin & fixed tree switch
This commit is contained in:
parent
cb59aade4e
commit
eb7bbedb20
11 changed files with 82 additions and 50 deletions
|
@ -33,6 +33,10 @@ class Event < ActiveRecord::Base
|
|||
action == self.class::Pushed
|
||||
end
|
||||
|
||||
def new_tag?
|
||||
data[:ref]["refs/tags"]
|
||||
end
|
||||
|
||||
def new_branch?
|
||||
data[:before] =~ /^00000/
|
||||
end
|
||||
|
@ -49,6 +53,10 @@ class Event < ActiveRecord::Base
|
|||
@branch_name ||= data[:ref].gsub("refs/heads/", "")
|
||||
end
|
||||
|
||||
def tag_name
|
||||
@tag_name ||= data[:ref].gsub("refs/tags/", "")
|
||||
end
|
||||
|
||||
def pusher
|
||||
User.find_by_id(data[:user_id])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue