class Github::Issues::Comments
def create(*args)
'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(*args) arguments(args, :required => [:user, :repo, :issue_id]) do sift VALID_ISSUE_COMMENT_PARAM_NAME assert_required %w[ body ] end params = arguments.params post_request("/repos/#{user}/#{repo}/issues/#{issue_id}/comments", params) end
def delete(*args)
github.issues.comments.delete 'user-name', 'repo-name', 'comment-id'
github = Github.new
= Examples
Delete a comment
def delete(*args) arguments(args, :required => [:user, :repo, :comment_id]) params = arguments.params delete_request("/repos/#{user}/#{repo}/issues/comments/#{comment_id}", params) end
def edit(*args)
'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(*args) arguments(args, :required => [:user, :repo, :comment_id]) do sift VALID_ISSUE_COMMENT_PARAM_NAME assert_required %w[ body ] end params = arguments.params patch_request("/repos/#{user}/#{repo}/issues/comments/#{comment_id}", params) end
def get(*args)
github.issues.comments.find 'user-name', 'repo-name', 'comment-id'
github = Github.new
= Examples
Get a single comment
def get(*args) arguments(args, :required => [:user, :repo, :comment_id]) params = arguments.params get_request("/repos/#{user}/#{repo}/issues/comments/#{comment_id}", params) end
def list(*args)
github.issues.comments.all 'user-name', 'repo-name' {|com| .. }
github.issues.comments.all 'user-name', 'repo-name'
github = Github.new
= Examples
format: YYYY-MM-DDTHH:MM:SSZ
* :since - Optional string of a timestamp in ISO 8601
Ignored with sort parameter.
* :direction - Optional string, asc or desc.
* :sort - Optional string, created or updated
= Parameters
List comments in a repository
github.issues.comments.all 'user-name', 'repo-name', issue_id: 'id' {|com| .. }
github.issues.comments.all 'user-name', 'repo-name', issue_id: 'id'
github = Github.new
= Examples
List comments on an issue
def list(*args) arguments(args, :required => [:user, :repo]) params = arguments.params response = if (issue_id = params.delete('issue_id')) get_request("/repos/#{user}/#{repo}/issues/#{issue_id}/comments", params) else get_request("/repos/#{user}/#{repo}/issues/comments", params) end return response unless block_given? response.each { |el| yield el } end