View Source GitHub.CodeScanning (GitHub REST API Client v0.0.11)
Provides API endpoints related to code scanning
Link to this section Summary
Functions
Delete a code scanning analysis from a repository
Get a code scanning alert
Get a code scanning analysis for a repository
Get a CodeQL database for a repository
Get a code scanning default setup configuration
Get information about a SARIF upload
List instances of a code scanning alert
List code scanning alerts for an organization
List code scanning alerts for a repository
List CodeQL databases for a repository
List code scanning analyses for a repository
Update a code scanning alert
Update a code scanning default setup configuration
Upload an analysis as SARIF data
Link to this section Functions
@spec delete_analysis(String.t(), String.t(), integer(), keyword()) :: {:ok, GitHub.CodeScanning.AnalysisDeletion.t()} | {:error, GitHub.Error.t()}
Delete a code scanning analysis from a repository
options
Options
confirm_delete
(String.t() | nil): Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter totrue
, you'll get a 400 response with the message:Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.
resources
Resources
@spec get_alert(String.t(), String.t(), integer(), keyword()) :: {:ok, GitHub.CodeScanning.Alert.t()} | {:error, GitHub.Error.t()}
Get a code scanning alert
resources
Resources
@spec get_analysis(String.t(), String.t(), integer(), keyword()) :: {:ok, GitHub.CodeScanning.Analysis.t()} | {:error, GitHub.Error.t()}
Get a code scanning analysis for a repository
resources
Resources
@spec get_codeql_database(String.t(), String.t(), String.t(), keyword()) :: {:ok, GitHub.CodeScanning.CodeqlDatabase.t()} | {:error, GitHub.Error.t()}
Get a CodeQL database for a repository
resources
Resources
@spec get_default_setup(String.t(), String.t(), keyword()) :: {:ok, GitHub.CodeScanning.DefaultSetup.t()} | {:error, GitHub.Error.t()}
Get a code scanning default setup configuration
resources
Resources
@spec get_sarif(String.t(), String.t(), String.t(), keyword()) :: {:ok, GitHub.CodeScanning.SarifsStatus.t()} | {:error, GitHub.Error.t()}
Get information about a SARIF upload
resources
Resources
@spec list_alert_instances(String.t(), String.t(), integer(), keyword()) :: {:ok, [GitHub.CodeScanning.AlertInstance.t()]} | {:error, GitHub.Error.t()}
List instances of a code scanning alert
options
Options
page
(integer): Page number of the results to fetch.per_page
(integer): The number of results per page (max 100).ref
(String.t()): The Git reference for the results you want to list. Theref
for a branch can be formatted either asrefs/heads/<branch name>
or simply<branch name>
. To reference a pull request userefs/pull/<number>/merge
.
resources
Resources
@spec list_alerts_for_org( String.t(), keyword() ) :: {:ok, [GitHub.CodeScanning.OrganizationAlertItems.t()]} | {:error, GitHub.Error.t()}
List code scanning alerts for an organization
options
Options
tool_name
(String.t()): The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using eithertool_name
ortool_guid
, but not both.tool_guid
(String.t() | nil): The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using eithertool_guid
ortool_name
, but not both.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.page
(integer): Page number of the results to fetch.per_page
(integer): The number of results per page (max 100).direction
(String.t()): The direction to sort the results by.state
(String.t()): If specified, only code scanning alerts with this state will be returned.sort
(String.t()): The property by which to sort the results.severity
(String.t()): If specified, only code scanning alerts with this severity will be returned.
resources
Resources
@spec list_alerts_for_repo(String.t(), String.t(), keyword()) :: {:ok, [GitHub.CodeScanning.AlertItems.t()]} | {:error, GitHub.Error.t()}
List code scanning alerts for a repository
options
Options
tool_name
(String.t()): The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using eithertool_name
ortool_guid
, but not both.tool_guid
(String.t() | nil): The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using eithertool_guid
ortool_name
, but not both.page
(integer): Page number of the results to fetch.per_page
(integer): The number of results per page (max 100).ref
(String.t()): The Git reference for the results you want to list. Theref
for a branch can be formatted either asrefs/heads/<branch name>
or simply<branch name>
. To reference a pull request userefs/pull/<number>/merge
.direction
(String.t()): The direction to sort the results by.sort
(String.t()): The property by which to sort the results.state
(String.t()): If specified, only code scanning alerts with this state will be returned.severity
(String.t()): If specified, only code scanning alerts with this severity will be returned.
resources
Resources
@spec list_codeql_databases(String.t(), String.t(), keyword()) :: {:ok, [GitHub.CodeScanning.CodeqlDatabase.t()]} | {:error, GitHub.Error.t()}
List CodeQL databases for a repository
resources
Resources
@spec list_recent_analyses(String.t(), String.t(), keyword()) :: {:ok, [GitHub.CodeScanning.Analysis.t()]} | {:error, GitHub.Error.t()}
List code scanning analyses for a repository
options
Options
tool_name
(String.t()): The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using eithertool_name
ortool_guid
, but not both.tool_guid
(String.t() | nil): The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using eithertool_guid
ortool_name
, but not both.page
(integer): Page number of the results to fetch.per_page
(integer): The number of results per page (max 100).ref
(String.t()): The Git reference for the analyses you want to list. Theref
for a branch can be formatted either asrefs/heads/<branch name>
or simply<branch name>
. To reference a pull request userefs/pull/<number>/merge
.sarif_id
(String.t()): Filter analyses belonging to the same SARIF upload.direction
(String.t()): The direction to sort the results by.sort
(String.t()): The property by which to sort the results.
resources
Resources
@spec update_alert(String.t(), String.t(), integer(), map(), keyword()) :: {:ok, GitHub.CodeScanning.Alert.t()} | {:error, GitHub.Error.t()}
Update a code scanning alert
resources
Resources
@spec update_default_setup( String.t(), String.t(), GitHub.CodeScanning.DefaultSetupUpdate.t(), keyword() ) :: {:ok, GitHub.CodeScanning.DefaultSetupUpdateResponse.t() | GitHub.EmptyObject.t()} | {:error, GitHub.Error.t()}
Update a code scanning default setup configuration
resources
Resources
@spec upload_sarif(String.t(), String.t(), map(), keyword()) :: {:ok, GitHub.CodeScanning.SarifsReceipt.t()} | {:error, GitHub.Error.t()}
Upload an analysis as SARIF data