Pushed widget improved

This commit is contained in:
randx 2012-06-21 18:41:22 +03:00
parent ed247b3893
commit 77cf662034
7 changed files with 22 additions and 16 deletions

View file

@ -9,6 +9,10 @@ module PushEvent
data[:ref]["refs/tags"]
end
def branch?
data[:ref]["refs/heads"]
end
def new_branch?
commit_from =~ /^00000/
end
@ -87,4 +91,8 @@ module PushEvent
def push_with_commits?
md_ref? && commits.any? && parent_commit && last_commit
end
def last_push_to_non_root?
branch? && project.default_branch != branch_name
end
end