Class: Ghub::Endpoints::Pulls::Models::Show

Inherits:
Struct
  • Object
show all
Defined in:
lib/ghub/endpoints/pulls/models/show.rb

Overview

Defines a single pull request.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeShow

Returns a new instance of Show.



74
75
76
77
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 74

def initialize(**)
  super
  freeze
end

Instance Attribute Details

Returns the value of attribute _links

Returns:

  • (Object)

    the current value of _links



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def _links
  @_links
end

#active_lock_reasonObject

Returns the value of attribute active_lock_reason

Returns:

  • (Object)

    the current value of active_lock_reason



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def active_lock_reason
  @active_lock_reason
end

#additionsObject

Returns the value of attribute additions

Returns:

  • (Object)

    the current value of additions



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def additions
  @additions
end

#assigneeObject

Returns the value of attribute assignee

Returns:

  • (Object)

    the current value of assignee



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def assignee
  @assignee
end

#assigneesObject

Returns the value of attribute assignees

Returns:

  • (Object)

    the current value of assignees



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def assignees
  @assignees
end

#author_associationObject

Returns the value of attribute author_association

Returns:

  • (Object)

    the current value of author_association



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def author_association
  @author_association
end

#auto_mergeObject

Returns the value of attribute auto_merge

Returns:

  • (Object)

    the current value of auto_merge



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def auto_merge
  @auto_merge
end

#baseObject

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def base
  @base
end

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def body
  @body
end

#changed_filesObject

Returns the value of attribute changed_files

Returns:

  • (Object)

    the current value of changed_files



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def changed_files
  @changed_files
end

#closed_atObject

Returns the value of attribute closed_at

Returns:

  • (Object)

    the current value of closed_at



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def closed_at
  @closed_at
end

#commentsObject

Returns the value of attribute comments

Returns:

  • (Object)

    the current value of comments



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def comments
  @comments
end

#comments_urlObject

Returns the value of attribute comments_url

Returns:

  • (Object)

    the current value of comments_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def comments_url
  @comments_url
end

#commitsObject

Returns the value of attribute commits

Returns:

  • (Object)

    the current value of commits



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def commits
  @commits
end

#commits_urlObject

Returns the value of attribute commits_url

Returns:

  • (Object)

    the current value of commits_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def commits_url
  @commits_url
end

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def created_at
  @created_at
end

#deletionsObject

Returns the value of attribute deletions

Returns:

  • (Object)

    the current value of deletions



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def deletions
  @deletions
end

#diff_urlObject

Returns the value of attribute diff_url

Returns:

  • (Object)

    the current value of diff_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def diff_url
  @diff_url
end

#draftObject

Returns the value of attribute draft

Returns:

  • (Object)

    the current value of draft



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def draft
  @draft
end

#headObject

Returns the value of attribute head

Returns:

  • (Object)

    the current value of head



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def head
  @head
end

#html_urlObject

Returns the value of attribute html_url

Returns:

  • (Object)

    the current value of html_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def html_url
  @html_url
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def id
  @id
end

#issue_urlObject

Returns the value of attribute issue_url

Returns:

  • (Object)

    the current value of issue_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def issue_url
  @issue_url
end

#labelsObject

Returns the value of attribute labels

Returns:

  • (Object)

    the current value of labels



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def labels
  @labels
end

#lockedObject

Returns the value of attribute locked

Returns:

  • (Object)

    the current value of locked



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def locked
  @locked
end

#maintainer_can_modifyObject

Returns the value of attribute maintainer_can_modify

Returns:

  • (Object)

    the current value of maintainer_can_modify



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def maintainer_can_modify
  @maintainer_can_modify
end

#merge_commit_shaObject

Returns the value of attribute merge_commit_sha

Returns:

  • (Object)

    the current value of merge_commit_sha



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def merge_commit_sha
  @merge_commit_sha
end

#mergeableObject

Returns the value of attribute mergeable

Returns:

  • (Object)

    the current value of mergeable



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def mergeable
  @mergeable
end

#mergeable_stateObject

Returns the value of attribute mergeable_state

Returns:

  • (Object)

    the current value of mergeable_state



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def mergeable_state
  @mergeable_state
end

#mergedObject

Returns the value of attribute merged

Returns:

  • (Object)

    the current value of merged



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def merged
  @merged
end

#merged_atObject

Returns the value of attribute merged_at

Returns:

  • (Object)

    the current value of merged_at



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def merged_at
  @merged_at
end

#merged_byObject

Returns the value of attribute merged_by

Returns:

  • (Object)

    the current value of merged_by



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def merged_by
  @merged_by
end

#milestoneObject

Returns the value of attribute milestone

Returns:

  • (Object)

    the current value of milestone



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def milestone
  @milestone
end

#node_idObject

Returns the value of attribute node_id

Returns:

  • (Object)

    the current value of node_id



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def node_id
  @node_id
end

#numberObject

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def number
  @number
end

#patch_urlObject

Returns the value of attribute patch_url

Returns:

  • (Object)

    the current value of patch_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def patch_url
  @patch_url
end

#rebaseableObject

Returns the value of attribute rebaseable

Returns:

  • (Object)

    the current value of rebaseable



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def rebaseable
  @rebaseable
end

#requested_reviewersObject

Returns the value of attribute requested_reviewers

Returns:

  • (Object)

    the current value of requested_reviewers



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def requested_reviewers
  @requested_reviewers
end

#requested_teamsObject

Returns the value of attribute requested_teams

Returns:

  • (Object)

    the current value of requested_teams



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def requested_teams
  @requested_teams
end

#review_comment_urlObject

Returns the value of attribute review_comment_url

Returns:

  • (Object)

    the current value of review_comment_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def review_comment_url
  @review_comment_url
end

#review_commentsObject

Returns the value of attribute review_comments

Returns:

  • (Object)

    the current value of review_comments



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def review_comments
  @review_comments
end

#review_comments_urlObject

Returns the value of attribute review_comments_url

Returns:

  • (Object)

    the current value of review_comments_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def review_comments_url
  @review_comments_url
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def state
  @state
end

#statuses_urlObject

Returns the value of attribute statuses_url

Returns:

  • (Object)

    the current value of statuses_url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def statuses_url
  @statuses_url
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def title
  @title
end

#updated_atObject

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def url
  @url
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



8
9
10
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 8

def user
  @user
end

Class Method Details

.for(**attributes) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/ghub/endpoints/pulls/models/show.rb', line 58

def self.for(**attributes)
  assignee = attributes[:assignee]

  new(
    **attributes.merge!(
      _links: Ghub::Models::Links.for(**attributes[:_links]),
      assignee: (Ghub::Models::User[**assignee] if assignee),
      assignees: attributes[:assignees].map { |data| Ghub::Models::User[**data] },
      base: Ghub::Models::Branch[**attributes[:base]],
      head: Ghub::Models::Branch[**attributes[:head]],
      labels: attributes[:labels].map { |data| Ghub::Models::Label[**data] },
      user: Ghub::Models::User[**attributes[:user]]
    )
  )
end