class Github::Issues::Comments

def create(user_name, repo_name, issue_id, params={})


"body" => 'a new comment'
github.issues.comments.create 'user-name', 'repo-name', 'issue-id',
github = Github.new
= Examples

:body Required string
= Inputs

Create a comment
def create(user_name, repo_name, issue_id, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _validate_presence_of issue_id
  _normalize_params_keys(params)
  # _merge_mime_type(:issue_comment, params)
  _filter_params_keys(VALID_ISSUE_COMMENT_PARAM_NAME, params)
  _validate_inputs(%w[ body ], params)
  post_request("/repos/#{user}/#{repo}/issues/#{issue_id}/comments", params)
end

def delete(user_name, repo_name, comment_id, params={})


github.issues.comments.delete 'user-name', 'repo-name', 'comment-id'
github = Github.new
= Examples

Delete a comment
def delete(user_name, repo_name, comment_id, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _validate_presence_of comment_id
  _normalize_params_keys(params)
  # _merge_mime_type(:issue_comment, params)
  delete_request("/repos/#{user}/#{repo}/issues/comments/#{comment_id}", params)
end

def edit(user_name, repo_name, comment_id, params={})


"body" => 'a new comment'
github.issues.comments.edit 'user-name', 'repo-name', 'comment-id',
github = Github.new
= Examples

:body Required string
= Inputs

Edit a comment
def edit(user_name, repo_name, comment_id, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _validate_presence_of comment_id
  _normalize_params_keys(params)
  # _merge_mime_type(:issue_comment, params)
  _filter_params_keys(VALID_ISSUE_COMMENT_PARAM_NAME, params)
  _validate_inputs(%w[ body ], params)
  patch_request("/repos/#{user}/#{repo}/issues/comments/#{comment_id}")
end

def get(user_name, repo_name, comment_id, params={})


github.issues.comments.find 'user-name', 'repo-name', 'comment-id'
github = Github.new
= Examples

Get a single comment
def get(user_name, repo_name, comment_id, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _validate_presence_of comment_id
  _normalize_params_keys(params)
  # _merge_mime_type(:issue_comment, params)
  get_request("/repos/#{user}/#{repo}/issues/comments/#{comment_id}", params)
end

def initialize(options = {})

Creates new Issues::Comments API
def initialize(options = {})
  super(options)
end

def list(user_name, repo_name, issue_id, params={})


github.issues.comments.all 'user-name', 'repo-name', 'issue-id' {|com| .. }
github.issues.comments.all 'user-name', 'repo-name', 'issue-id'
github = Github.new
= Examples

List comments on an issue
def list(user_name, repo_name, issue_id, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _validate_presence_of issue_id
  _normalize_params_keys(params)
  # _merge_mime_type(:issue_comment, params)
  response = get_request("/repos/#{user}/#{repo}/issues/#{issue_id}/comments", params)
  return response unless block_given?
  response.each { |el| yield el }
end