- B
- C
- L
- M
- N
- P
- R
- T
- V
Source: show
# File app/roles/push_event.rb, line 12 def branch? data[:ref]["refs/heads"] end
Source: show
# File app/roles/push_event.rb, line 48 def branch_name @branch_name ||= data[:ref].gsub("refs/heads/", "") end
Source: show
# File app/roles/push_event.rb, line 32 def commit_from data[:before] end
Source: show
# File app/roles/push_event.rb, line 36 def commit_to data[:after] end
Max 20 commits from push DESC
Source: show
# File app/roles/push_event.rb, line 57 def commits @commits ||= data[:commits].map { |commit| project.commit(commit[:id]) }.reverse end
Source: show
# File app/roles/push_event.rb, line 61 def commits_count data[:total_commits_count] || commits.count || 0 end
Source: show
# File app/roles/push_event.rb, line 85 def last_commit project.commit(commit_to) rescue => ex nil end
Source: show
# File app/roles/push_event.rb, line 97 def last_push_to_non_root? branch? && project.default_branch != branch_name end
Source: show
# File app/roles/push_event.rb, line 28 def md_ref? !(rm_ref? || new_ref?) end
Source: show
# File app/roles/push_event.rb, line 16 def new_branch? commit_from =~ %r^00000/ end
Source: show
# File app/roles/push_event.rb, line 20 def new_ref? commit_from =~ %r^00000/ end
Source: show
# File app/roles/push_event.rb, line 79 def parent_commit project.commit(commit_from) rescue => ex nil end
Source: show
# File app/roles/push_event.rb, line 69 def push_action_name if new_ref? "pushed new" elsif rm_ref? "deleted" else "pushed to" end end
Source: show
# File app/roles/push_event.rb, line 91 def push_with_commits? md_ref? && commits.any? && parent_commit && last_commit rescue Grit::NoSuchPathError false end
Source: show
# File app/roles/push_event.rb, line 40 def ref_name if tag? tag_name else branch_name end end
Source: show
# File app/roles/push_event.rb, line 65 def ref_type tag? ? "tag" : "branch" end
Source: show
# File app/roles/push_event.rb, line 24 def rm_ref? commit_to =~ %r^00000/ end
Source: show
# File app/roles/push_event.rb, line 8 def tag? data[:ref]["refs/tags"] end