/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofixCreate an autofix for a code scanning alert
Creates an autofix for a code scanning alert on a repository's default branch. Supply owner, repo, and alert_number to identify the repository and alert, and use the required authorization scope for the repository's visibility. A 202 response indicates that an autofix is being generated or newly created, while a 200 response indicates that an autofix already exists.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
A 400 is returned when the request is invalid, a 403 is returned when the repository is archived, GitHub Advanced Security is disabled, or the rate limit is exceeded, and a 404 is returned when the requested resource is not found. A 422 is returned for an unprocessable request, and a 500 indicates an internal error. For private or public repositories, OAuth app tokens and personal access tokens (classic) need the security_events scope; use public_repo for public repositories only.