{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Updates the status of a single code scanning alert.\nOAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.","properties":{"path":{"type":"object","properties":{"owner":{"type":"string","description":"The account owner of the repository. The name is not case sensitive."},"repo":{"type":"string","description":"The name of the repository without the `.git` extension. The name is not case sensitive."},"alert_number":{"$ref":"#/definitions/alert-number","description":"The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation."}},"required":["owner","repo","alert_number"],"additionalProperties":false},"body":{"type":"object","properties":{"state":{"$ref":"#/definitions/code-scanning-alert-set-state"},"dismissed_reason":{"$ref":"#/definitions/code-scanning-alert-dismissed-reason"},"dismissed_comment":{"$ref":"#/definitions/code-scanning-alert-dismissed-comment"},"create_request":{"$ref":"#/definitions/code-scanning-alert-create-request"},"assignees":{"$ref":"#/definitions/code-scanning-alert-assignees"}},"anyOf":[{"required":["state"]},{"required":["assignees"]}],"examples":[{"state":"dismissed","dismissed_reason":"false positive","dismissed_comment":"This alert is not actually correct, because there's a sanitizer included in the library.","create_request":true}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"alert-number":{"type":"integer","description":"The security alert number."},"code-scanning-alert-set-state":{"description":"Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`.","type":"string","enum":["open","dismissed"]},"code-scanning-alert-dismissed-reason":{"type":["string","null"],"description":"**Required when the state is dismissed.** The reason for dismissing or closing the alert.","enum":["false positive","won't fix","used in tests","mitigated"]},"code-scanning-alert-dismissed-comment":{"type":["string","null"],"description":"The dismissal comment associated with the dismissal of the alert.","maxLength":280},"code-scanning-alert-create-request":{"type":"boolean","description":"If `true`, attempt to create an alert dismissal request."},"code-scanning-alert-assignees":{"description":"The list of users to assign to the code scanning alert. An empty array unassigns all previous assignees from the alert.","type":"array","items":{"type":"string"}}}},"name":"Update a code scanning alert","id":"github.code-scanning.update-alert","example":{"path":{"owner":"octocat","repo":"hello-world","alert_number":1},"body":{"state":"dismissed","dismissed_reason":"false positive","dismissed_comment":"This alert is not actually correct, because there's a sanitizer included in the library.","create_request":true}},"maxRequests":1,"summary":false}}