GhEx.CodeSecurity (gh_ex v0.3.4)

Copy Markdown View Source

Repository code-scanning, Dependabot, and secret-scanning alerts.

These thin wrappers return the same {:ok, body, meta} / {:error, reason} shape as GhEx.REST; opts pass through to Req.

The authenticated token needs the corresponding repository alert permission. The security feature must also be available and enabled for the repository. Updating a code-scanning alert requires write permission.

Summary

Functions

Gets a code-scanning alert by number.

Gets a secret-scanning alert by number.

Lists code-scanning alerts for a repository.

Lists Dependabot alerts for a repository.

Lists secret-scanning alerts for a repository.

Auto-paginates repository code-scanning alerts into a lazy Stream.

Auto-paginates repository Dependabot alerts into a lazy Stream.

Auto-paginates repository secret-scanning alerts into a lazy Stream.

Types

alert_number()

@type alert_number() :: non_neg_integer() | String.t()

Functions

get_alert(client, owner, repo, alert_number, opts \\ [])

@spec get_alert(GhEx.Client.t(), String.t(), String.t(), alert_number(), keyword()) ::
  GhEx.REST.result()

Gets a code-scanning alert by number.

get_dependabot_alert(client, owner, repo, alert_number, opts \\ [])

@spec get_dependabot_alert(
  GhEx.Client.t(),
  String.t(),
  String.t(),
  alert_number(),
  keyword()
) ::
  GhEx.REST.result()

Gets a Dependabot alert by number.

get_secret_alert(client, owner, repo, alert_number, opts \\ [])

@spec get_secret_alert(
  GhEx.Client.t(),
  String.t(),
  String.t(),
  alert_number(),
  keyword()
) ::
  GhEx.REST.result()

Gets a secret-scanning alert by number.

list_alerts(client, owner, repo, opts \\ [])

@spec list_alerts(GhEx.Client.t(), String.t(), String.t(), keyword()) ::
  GhEx.REST.result()

Lists code-scanning alerts for a repository.

list_dependabot_alerts(client, owner, repo, opts \\ [])

@spec list_dependabot_alerts(GhEx.Client.t(), String.t(), String.t(), keyword()) ::
  GhEx.REST.result()

Lists Dependabot alerts for a repository.

list_secret_alerts(client, owner, repo, opts \\ [])

@spec list_secret_alerts(GhEx.Client.t(), String.t(), String.t(), keyword()) ::
  GhEx.REST.result()

Lists secret-scanning alerts for a repository.

stream_alerts(client, owner, repo, opts \\ [])

@spec stream_alerts(GhEx.Client.t(), String.t(), String.t(), keyword()) ::
  Enumerable.t()

Auto-paginates repository code-scanning alerts into a lazy Stream.

stream_dependabot_alerts(client, owner, repo, opts \\ [])

@spec stream_dependabot_alerts(GhEx.Client.t(), String.t(), String.t(), keyword()) ::
  Enumerable.t()

Auto-paginates repository Dependabot alerts into a lazy Stream.

stream_secret_alerts(client, owner, repo, opts \\ [])

@spec stream_secret_alerts(GhEx.Client.t(), String.t(), String.t(), keyword()) ::
  Enumerable.t()

Auto-paginates repository secret-scanning alerts into a lazy Stream.

update_alert(client, owner, repo, alert_number, attrs, opts \\ [])

@spec update_alert(
  GhEx.Client.t(),
  String.t(),
  String.t(),
  alert_number(),
  map(),
  keyword()
) ::
  GhEx.REST.result()

Updates a code-scanning alert.