Overview
The teams at CircleCI have heard feedback across several channels regarding Project Features that require opening a support request to make changes.
To empower our user-base, we have started the process of releasing previously private endpoints for users to leverage the ability to configure these features without requiring help from a Support Engineer.
Available Features
Feature | Description |
| Disable SSH capability for any future builds on this project |
| Only admins will be allowed to modify(write permissions) project settings |
| Enable the Only Build PRs toggle seen in the Advanced Settings of a project |
Note: These flags are only at the Project Level and default to false
Using the CLI to update these settings
The easiest way to update these settings is to use the CLI tool using the commands below for each respective setting
circleci project setting set disable-ssh true --project <project-slug>
circleci project setting set write-settings-requires-admin true --project <project-slug>
circleci project setting set build-prs-only true --project <project-slug>
Using the API to update these settings
To update these settings, please use the following cURL command:
# Resolve project ID from slug (e.g. gh/org/repo)
export PROJECT_ID=$(curl -sS \
--header "Authorization: Bearer <token>" \
--header "Accept: application/json" \
"https://circleci.com/api/v3/projects?filter\[slug\]=<project-slug>" \
| jq -r '.data[0].id')
curl -X POST \
--header "Authorization: Bearer <token>" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{"is_ssh_disabled": true, "is_admin_required_for_writing_settings": true}' \
"https://circleci.com/api/v3/projects/${PROJECT_ID}/update-settings"
Update
<token>to point to your Personal API Token.Update
<project-slug>to point to your project, in the format<vcs>/<org>/<project>The expected response when updating these settings is HTTP 200 with a body containing all of the current settings for the project.
Please share any feedback with your account team or with the Support Engineering team here at CircleCI!
