Skip to main content

alerts

Overview

Namealerts
TypeResource
Idgithub.code_scanning.alerts

Fields

NameDatatypeDescription
dismissed_atstringThe time that the alert was dismissed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
created_atstringThe time that the alert was created in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
ruleobject
toolobject
fixed_atstringThe time that the alert was no longer detected and was considered fixed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
instances_urlstringThe REST API URL for fetching the list of instances for an alert.
numberintegerThe security alert number.
urlstringThe REST API URL of the alert resource.
most_recent_instanceobject
html_urlstringThe GitHub URL of the alert resource.
updated_atstringThe time that the alert was last updated in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
statestringState of a code scanning alert.
dismissed_reasonstringRequired when the state is dismissed. The reason for dismissing or closing the alert.
dismissed_byobjectA GitHub user.
dismissed_commentstringThe dismissal comment associated with the dismissal of the alert.

Methods

NameAccessible byRequired ParamsDescription
get_alertSELECTalert_number, owner, repoGets a single code scanning alert. You must use an access token with the security_events scope to use this endpoint with private repos, the public_repo scope also grants permission to read security events on public repos only. GitHub Apps must have the security_events read permission to use this endpoint.
update_alertEXECalert_number, owner, repo, data__stateUpdates the status of a single code scanning alert. You must use an access token with the security_events scope to use this endpoint with private repositories. You can also use tokens with the public_repo scope for public repositories only. GitHub Apps must have the security_events write permission to use this endpoint.