Pushed widget improved
This commit is contained in:
parent
ed247b3893
commit
77cf662034
7 changed files with 22 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue