Schema Information
Table name: events
id :integer not null, primary key target_type :string(255) target_id :integer title :string(255) data :text project_id :integer created_at :datetime not null updated_at :datetime not null action :integer author_id :integer
- A
- C
- D
- I
- J
- L
- M
- N
- P
- R
- T
Created | = | 1 |
Updated | = | 2 |
Closed | = | 3 |
Reopened | = | 4 |
Pushed | = | 5 |
Commented | = | 6 |
Merged | = | 7 |
Joined | = | 8 |
Left | = | 9 |
Source: show
# File app/models/event.rb, line 53 def determine_action(record) if [Issue, MergeRequest].include? record.class Event::Created elsif record.kind_of? Note Event::Commented end end
Source: show
# File app/models/event.rb, line 160 def action_name if closed? "closed" elsif merged? "merged" elsif joined? 'joined' elsif left? 'left' else "opened" end end
Source: show
# File app/models/event.rb, line 131 def changed_issue? target_type == "Issue" && [Closed, Reopened].include?(action) end
Source: show
# File app/models/event.rb, line 126 def changed_merge_request? target_type == "MergeRequest" && [Closed, Reopened].include?(action) end
Source: show
# File app/models/event.rb, line 92 def closed? action == self.class::Closed end
Source: show
# File app/models/event.rb, line 148 def issue target if target_type == "Issue" end
Source: show
# File app/models/event.rb, line 108 def issue? target_type == "Issue" end
Source: show
# File app/models/event.rb, line 144 def membership_changed? joined? || left? end
Source: show
# File app/models/event.rb, line 152 def merge_request target if target_type == "MergeRequest" end
Source: show
# File app/models/event.rb, line 112 def merge_request? target_type == "MergeRequest" end
Source: show
# File app/models/event.rb, line 88 def merged? action == self.class::Merged end
Source: show
# File app/models/event.rb, line 100 def milestone? target_type == "Milestone" end
Source: show
# File app/models/event.rb, line 116 def new_issue? target_type == "Issue" && action == Created end
Source: show
# File app/models/event.rb, line 121 def new_merge_request? target_type == "MergeRequest" && action == Created end
Source: show
# File app/models/event.rb, line 72 def project_name if project project.name else "(deleted project)" end end
Source: show
# File app/models/event.rb, line 62 def proper? if push? true elsif membership_changed? true else (issue? || merge_request? || note? || milestone?) && target end end
Source: show
# File app/models/event.rb, line 84 def push? action == self.class::Pushed && valid_push? end