Convenience functions for GitHub's commit-detail REST APIs.
This module covers single commits, comparisons, associated pull requests, and
commit comments. Repository-wide commit listing remains available through
GhEx.Repositories.list_commits/4 and GhEx.Repositories.stream_commits/4.
These thin wrappers return the same {:ok, body, meta} / {:error, reason}
shape as GhEx.REST and pass opts through to Req.
Summary
Functions
Compares base to head.
Creates a comment on a commit.
Gets a commit by SHA, branch name, or tag name.
Lists comments on a commit.
Lists pull requests associated with a commit SHA.
Auto-paginates comments on a commit into a lazy Stream.
Auto-paginates pull requests associated with a commit into a lazy Stream.
Types
@type ref() :: String.t()
Functions
@spec compare(GhEx.Client.t(), String.t(), String.t(), ref(), ref(), keyword()) :: GhEx.REST.result()
Compares base to head.
Each side may be a SHA, branch, tag, or a cross-fork form such as
"octocat:feature". Use params: for page and per_page.
@spec create_comment(GhEx.Client.t(), String.t(), String.t(), ref(), map(), keyword()) :: GhEx.REST.result()
Creates a comment on a commit.
attrs requires body. To anchor it to a diff, also provide path and
position; GitHub is closing down the older line parameter.
@spec get(GhEx.Client.t(), String.t(), String.t(), ref(), keyword()) :: GhEx.REST.result()
Gets a commit by SHA, branch name, or tag name.
@spec list_comments(GhEx.Client.t(), String.t(), String.t(), ref(), keyword()) :: GhEx.REST.result()
Lists comments on a commit.
@spec list_pulls(GhEx.Client.t(), String.t(), String.t(), ref(), keyword()) :: GhEx.REST.result()
Lists pull requests associated with a commit SHA.
@spec stream_comments(GhEx.Client.t(), String.t(), String.t(), ref(), keyword()) :: Enumerable.t()
Auto-paginates comments on a commit into a lazy Stream.
@spec stream_pulls(GhEx.Client.t(), String.t(), String.t(), ref(), keyword()) :: Enumerable.t()
Auto-paginates pull requests associated with a commit into a lazy Stream.