View Source GitHub.Dependabot (GitHub REST API Client v0.0.11)

Provides API endpoints related to dependabot

Link to this section Summary

Functions

Add selected repository to an organization secret

Create or update an organization secret

Delete an organization secret

Get an organization public key

Get a repository public key

List Dependabot alerts for an enterprise

List Dependabot alerts for an organization

List Dependabot alerts for a repository

List organization secrets

List selected repositories for an organization secret

Remove selected repository from an organization secret

Set selected repositories for an organization secret

Link to this section Functions

Link to this function

add_selected_repo_to_org_secret(org, secret_name, repository_id, opts \\ [])

View Source
@spec add_selected_repo_to_org_secret(String.t(), String.t(), integer(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Add selected repository to an organization secret

resources

Resources

Link to this function

create_or_update_org_secret(org, secret_name, body, opts \\ [])

View Source
@spec create_or_update_org_secret(String.t(), String.t(), map(), keyword()) ::
  {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}

Create or update an organization secret

resources

Resources

Link to this function

create_or_update_repo_secret(owner, repo, secret_name, body, opts \\ [])

View Source
@spec create_or_update_repo_secret(
  String.t(),
  String.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}

Create or update a repository secret

resources

Resources

Link to this function

delete_org_secret(org, secret_name, opts \\ [])

View Source
@spec delete_org_secret(String.t(), String.t(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Delete an organization secret

resources

Resources

Link to this function

delete_repo_secret(owner, repo, secret_name, opts \\ [])

View Source
@spec delete_repo_secret(String.t(), String.t(), String.t(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Delete a repository secret

resources

Resources

Link to this function

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

View Source
@spec get_alert(String.t(), String.t(), integer(), keyword()) ::
  {:ok, GitHub.Dependabot.Alert.t()} | {:error, GitHub.Error.t()}

Get a Dependabot alert

resources

Resources

Link to this function

get_org_public_key(org, opts \\ [])

View Source
@spec get_org_public_key(
  String.t(),
  keyword()
) :: {:ok, GitHub.Dependabot.PublicKey.t()} | {:error, GitHub.Error.t()}

Get an organization public key

resources

Resources

Link to this function

get_org_secret(org, secret_name, opts \\ [])

View Source
@spec get_org_secret(String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Organization.DependabotSecret.t()} | {:error, GitHub.Error.t()}

Get an organization secret

resources

Resources

Link to this function

get_repo_public_key(owner, repo, opts \\ [])

View Source
@spec get_repo_public_key(String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Dependabot.PublicKey.t()} | {:error, GitHub.Error.t()}

Get a repository public key

resources

Resources

Link to this function

get_repo_secret(owner, repo, secret_name, opts \\ [])

View Source
@spec get_repo_secret(String.t(), String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Dependabot.Secret.t()} | {:error, GitHub.Error.t()}

Get a repository secret

resources

Resources

Link to this function

list_alerts_for_enterprise(enterprise, opts \\ [])

View Source
@spec list_alerts_for_enterprise(
  String.t(),
  keyword()
) ::
  {:ok, [GitHub.Dependabot.Alert.WithRepository.t()]}
  | {:error, GitHub.Error.t()}

List Dependabot alerts for an enterprise

options

Options

  • state (String.t()): A comma-separated list of states. If specified, only alerts with these states will be returned.

Can be: auto_dismissed, dismissed, fixed, open

  • severity (String.t()): A comma-separated list of severities. If specified, only alerts with these severities will be returned.

Can be: low, medium, high, critical

  • ecosystem (String.t()): A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.

Can be: composer, go, maven, npm, nuget, pip, pub, rubygems, rust

  • package (String.t()): A comma-separated list of package names. If specified, only alerts for these packages will be returned.
  • scope (String.t()): The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned.
  • sort (String.t()): The property by which to sort the results. created means when the alert was created. updated means when the alert's state last changed.
  • direction (String.t()): The direction to sort the results by.
  • before (String.t()): A cursor, as given in the Link header. If specified, the query only searches for results before this cursor.
  • after (String.t()): A cursor, as given in the Link header. If specified, the query only searches for results after this cursor.
  • first (integer): Deprecated. The number of results per page (max 100), starting from the first matching result. This parameter must not be used in combination with last. Instead, use per_page in combination with after to fetch the first page of results.
  • last (integer): Deprecated. The number of results per page (max 100), starting from the last matching result. This parameter must not be used in combination with first. Instead, use per_page in combination with before to fetch the last page of results.
  • per_page (integer): The number of results per page (max 100).

resources

Resources

Link to this function

list_alerts_for_org(org, opts \\ [])

View Source
@spec list_alerts_for_org(
  String.t(),
  keyword()
) ::
  {:ok, [GitHub.Dependabot.Alert.WithRepository.t()]}
  | {:error, GitHub.Error.t()}

List Dependabot alerts for an organization

options

Options

  • state (String.t()): A comma-separated list of states. If specified, only alerts with these states will be returned.

Can be: auto_dismissed, dismissed, fixed, open

  • severity (String.t()): A comma-separated list of severities. If specified, only alerts with these severities will be returned.

Can be: low, medium, high, critical

  • ecosystem (String.t()): A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.

Can be: composer, go, maven, npm, nuget, pip, pub, rubygems, rust

  • package (String.t()): A comma-separated list of package names. If specified, only alerts for these packages will be returned.
  • scope (String.t()): The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned.
  • sort (String.t()): The property by which to sort the results. created means when the alert was created. updated means when the alert's state last changed.
  • direction (String.t()): The direction to sort the results by.
  • before (String.t()): A cursor, as given in the Link header. If specified, the query only searches for results before this cursor.
  • after (String.t()): A cursor, as given in the Link header. If specified, the query only searches for results after this cursor.
  • first (integer): Deprecated. The number of results per page (max 100), starting from the first matching result. This parameter must not be used in combination with last. Instead, use per_page in combination with after to fetch the first page of results.
  • last (integer): Deprecated. The number of results per page (max 100), starting from the last matching result. This parameter must not be used in combination with first. Instead, use per_page in combination with before to fetch the last page of results.
  • per_page (integer): The number of results per page (max 100).

resources

Resources

Link to this function

list_alerts_for_repo(owner, repo, opts \\ [])

View Source
@spec list_alerts_for_repo(String.t(), String.t(), keyword()) ::
  {:ok, [GitHub.Dependabot.Alert.t()]} | {:error, GitHub.Error.t()}

List Dependabot alerts for a repository

options

Options

  • state (String.t()): A comma-separated list of states. If specified, only alerts with these states will be returned.

Can be: auto_dismissed, dismissed, fixed, open

  • severity (String.t()): A comma-separated list of severities. If specified, only alerts with these severities will be returned.

Can be: low, medium, high, critical

  • ecosystem (String.t()): A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.

Can be: composer, go, maven, npm, nuget, pip, pub, rubygems, rust

  • package (String.t()): A comma-separated list of package names. If specified, only alerts for these packages will be returned.
  • manifest (String.t()): A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned.
  • scope (String.t()): The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned.
  • sort (String.t()): The property by which to sort the results. created means when the alert was created. updated means when the alert's state last changed.
  • direction (String.t()): The direction to sort the results by.
  • page (integer): Deprecated. Page number of the results to fetch. Use cursor-based pagination with before or after instead.
  • per_page (integer): The number of results per page (max 100).
  • before (String.t()): A cursor, as given in the Link header. If specified, the query only searches for results before this cursor.
  • after (String.t()): A cursor, as given in the Link header. If specified, the query only searches for results after this cursor.
  • first (integer): Deprecated. The number of results per page (max 100), starting from the first matching result. This parameter must not be used in combination with last. Instead, use per_page in combination with after to fetch the first page of results.
  • last (integer): Deprecated. The number of results per page (max 100), starting from the last matching result. This parameter must not be used in combination with first. Instead, use per_page in combination with before to fetch the last page of results.

resources

Resources

Link to this function

list_org_secrets(org, opts \\ [])

View Source
@spec list_org_secrets(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, GitHub.Error.t()}

List organization secrets

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_repo_secrets(owner, repo, opts \\ [])

View Source
@spec list_repo_secrets(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List repository secrets

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_selected_repos_for_org_secret(org, secret_name, opts \\ [])

View Source
@spec list_selected_repos_for_org_secret(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

List selected repositories for an organization secret

options

Options

  • page (integer): Page number of the results to fetch.
  • per_page (integer): The number of results per page (max 100).

resources

Resources

Link to this function

remove_selected_repo_from_org_secret(org, secret_name, repository_id, opts \\ [])

View Source
@spec remove_selected_repo_from_org_secret(
  String.t(),
  String.t(),
  integer(),
  keyword()
) ::
  :ok | {:error, GitHub.Error.t()}

Remove selected repository from an organization secret

resources

Resources

Link to this function

set_selected_repos_for_org_secret(org, secret_name, body, opts \\ [])

View Source
@spec set_selected_repos_for_org_secret(String.t(), String.t(), map(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Set selected repositories for an organization secret

resources

Resources

Link to this function

update_alert(owner, repo, alert_number, body, opts \\ [])

View Source
@spec update_alert(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.Dependabot.Alert.t()} | {:error, GitHub.Error.t()}

Update a Dependabot alert

resources

Resources