class ListItem

This class represents an item in the list

Attributes

pr[R]

Public Class Methods

new(pull_request) click to toggle source
# File bin/git-diff-prs, line 11
def initialize(pull_request)
  @pr = pull_request
end

Public Instance Methods

mention() click to toggle source
# File bin/git-diff-prs, line 23
def mention
  mention = if pr.assignee
              "@#{pr.assignee.login}"
            elsif pr.user
              "@#{pr.user.login}"
            end

  mention ? " #{mention}" : ''
end
to_checklist() click to toggle source
# File bin/git-diff-prs, line 15
def to_checklist
  "- [ ] ##{pr.number} #{pr.title}" + mention
end