repo_code_security_configuration
Creates, updates, deletes, gets or lists a repo_code_security_configuration resource.
Overview
| Name | repo_code_security_configuration |
| Type | Resource |
| Id | github.code_security.repo_code_security_configuration |
Fields
The following fields are returned by SELECT queries:
- get_configuration_for_repository
Response
| Name | Datatype | Description |
|---|---|---|
configuration | object | A code security configuration |
status | string | The attachment status of the code security configuration on the repository. (attached, attaching, detached, removed, enforced, failed, updating, removed_by_enterprise) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_configuration_for_repository | select | owner, repo | Get the code security configuration that manages a repository's code security settings. The authenticated user must be an administrator or security manager for the organization to use this endpoint. OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
SELECT examples
- get_configuration_for_repository
Get the code security configuration that manages a repository's code security settings.
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
SELECT
configuration,
status
FROM github.code_security.repo_code_security_configuration
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;