Tentacat.Pulls.Comments

Summary

create(owner, repo, number, body, client)

Create a comment for a pull request

find(owner, repo, comment_id, client \\ %Tentacat.Client{})

Get a single comment for a repository by comment id

list(owner, repo, number, client \\ %Tentacat.Client{})

List comments on a pull request

list_all(owner, repo, client \\ %Tentacat.Client{})

List pull requests comments in a repository

remove(owner, repo, comment_id, client)

Delete a pull request’s comment by it’s Id

update(owner, repo, comment_id, body, client)

Edit a comment for a pull request

Functions

create(owner, repo, number, body, client)

Specs:

Create a comment for a pull request

Comment body example:

%{
  "body"      => "Nice change",
  "commit_id" => "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "path"      => "file1.txt",
  "position"  =>  4
}

Example

Tentacat.Pulls.Comments.create "elixir-lang", "elixir", 2974, comment_body, client

More info at: https://developer.github.com/v3/pulls/comments/#create-a-comment

find(owner, repo, comment_id, client \\ %Tentacat.Client{})

Specs:

Get a single comment for a repository by comment id

Example

Tentacat.Pulls.Comments.find "elixir-lang", "elixir", "22377723"
Tentacat.Pulls.Comments.list "elixir-lang", "elixir", "22377723", client

More info at: https://developer.github.com/v3/pulls/comments/#get-a-single-comment

list(owner, repo, number, client \\ %Tentacat.Client{})

Specs:

List comments on a pull request

Example

Tentacat.Pulls.Comments.list "elixir-lang", "elixir", "2974"
Tentacat.Pulls.Comments.list "elixir-lang", "elixir", "2974", client

More info at: https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request

list_all(owner, repo, client \\ %Tentacat.Client{})

Specs:

List pull requests comments in a repository

Example

Tentacat.Pulls.Comments.list_all "elixir-lang", "elixir"
Tentacat.Pulls.Comments.list_all "elixir-lang", "elixir", client

More info at: https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository

remove(owner, repo, comment_id, client)

Specs:

Delete a pull request’s comment by it’s Id.

Example

Tentacat.Pulls.Comments.remove "elixir-lang", "elixir", "22377723", client

More info at: https://developer.github.com/v3/pulls/comments/#delete-a-comment

update(owner, repo, comment_id, body, client)

Specs:

Edit a comment for a pull request

Example

Tentacat.Pulls.Comments.update "elixir-lang", "elixir", "22377723", comment_body, client

More info at: https://developer.github.com/v3/pulls/comments/#edit-a-comment