Ehee v0.0.1 Ehee.Repos

The Repository and Pull Requests Webhooks API

Summary

Functions

create_pull_request(credential, owner, repo, title, head, base, body \\ "")

Specs

create_pull_request(Ehee.Credential.t, binary, binary, binary, binary, binary, binary) :: Ehee.response

Create a pull request

Example

Ehee.Repos.create_pull_request(credential, "owner", "repository_name", "Amasing new feature", "octocat:new-feature", "master", "Please pull this in!")

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

edit_pull_request(credential, owner, repo, pull_no, title, base, body, state)

Specs

edit_pull_request(Ehee.Credential.t, binary, binary, integer, binary, binary, binary, binary) :: Ehee.response

Update a pull request

Example

Ehee.Repos.edit_pull_request(credential, "owner", "repository_name",100, "new title", "master", "new body", "open")

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

list(credential, options \\ [])

List your repositories

Example

Ehee.Repos.list(credential, visibility: "public", sort: "updated", direction: "desc")

More info at: https://developer.github.com/v3/repos/#list-your-repositories

list_users(credential, username, options \\ [])

Specs

list_users(Ehee.Credential.t, binary, Keyword.t) :: Ehee.response

List user repositories

Example

Ehee.Repos.list_users(credential, sort: "updated", direction: "desc")

More info at: https://developer.github.com/v3/repos/#list-user-repositories

pull_request_commits(credential, owner, repo, pull_no)

Specs

pull_request_commits(Ehee.Credential.t, binary, binary, integer) :: Ehee.response

List commits on a pull request

Example

Ehee.Repos.pull_request_commits(credential, "owner", "repository_name", 100)

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

pull_request_files(credential, owner, repo, pull_no)

Specs

pull_request_files(Ehee.Credential.t, binary, binary, integer) :: Ehee.response

List pull requests files

Example

Ehee.Repos.pull_request_files(credential, "owner", "repository_name", 100)

More info at: https://developer.github.com/v3/pulls/#list-pull-requests-files

pull_request_merge!(credential, owner, repo, pull_no, message \\ "")

Specs

pull_request_merge!(Ehee.Credential.t, binary, binary, integer, binary) :: Ehee.response

Merge a pull request(Merge Button)

Example

Ehee.Repos.pull_request_merge!(credential, "owner", "repository_name", 100)

More info at: https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button

pull_request_merged?(credential, owner, repo, pull_no)

Specs

pull_request_merged?(Ehee.Credential.t, binary, binary, integer) :: Ehee.response

Get if a pull request has been merged

Example

Ehee.Repos.pull_request_merged?(credential, "owner", "repository_name", 100)

More info at: https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged

pull_requests(credential, owner, repo, options \\ [])

Specs

pull_requests(Ehee.Credential.t, binary, binary, Keyword.t) :: Ehee.response

List pull requests

Example

Ehee.Repos.pull_requests(credential, state: "open", sort: "updated", direction: "desc")

More info at: https://developer.github.com/v3/pulls/#list-pull-requests

show_pull_request(credential, owner, repo, pull_no)

Specs

show_pull_request(Ehee.Credential.t, binary, binary, integer) :: Ehee.response

Get a single pull request

Example

Ehee.Repos.show_pull_request(credential, "owner", "repository_name", "pull_request_no")

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