Class: HornOfPlenty::Models::Issue

Inherits:
Object
  • Object
show all
Includes:
Parsable
Defined in:
lib/horn_of_plenty/models/issue.rb

Direct Known Subclasses

PullRequest

Instance Attribute Summary

Attributes included from Parsable

#parser

Instance Method Summary collapse

Methods included from Parsable

included, #initialize

Instance Method Details

#to_hObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/horn_of_plenty/models/issue.rb', line 23

def to_h
  {
    id:               id,
    author_id:        author_id,
    assignee_ids:     assignee_ids,
    closer_id:        closer_id,
    repository:       repository,
    status:           status,
    title:            title,
    description:      description,
    labels:           labels,
    closed_at:        closed_at,
    has_pull_request: has_pull_request?,
    created_at:       created_at,
    updated_at:       updated_at,
  }
end

#to_shaObject



41
42
43
# File 'lib/horn_of_plenty/models/issue.rb', line 41

def to_sha
  @sha ||= Digest::SHA2.hexdigest(to_h.to_s)
end