Skip to content

Support "security_and_analysis" repository settings #2132

@asvoboda

Description

@asvoboda

The new security and analysis repository settings for advanced security and secret scanning don't appear to be supported just yet in the repository endpoints api implementation. Currently a user would need to manually muck with the UI to enable these settings.

The object itself is a little awkward, since it uses strings (enabled and disabled) instead of booleans to enable/disable the feature, but otherwise should be relatively straight forward to implement.

Example data from the v3 /repos endpoint on a repo where these settings are enabled:

$ curl -u ":$GITHUB_TOKEN" "https://github.domain/api/v3/repos/org/repo"
{
  "id": 123456,
  ...
  "security_and_analysis": {
    "advanced_security": {
      "status": "enabled"
    },
    "secret_scanning": {
      "status": "enabled"
    }
  },
  ...
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions