VCS Default Branch Isn't Reflected on CircleCI

You may change the default branch on your VCS provider, and sometimes that change won't be reflected on CircleCI. This can cause issues with some features that rely on knowing which branch is the default, such as Github status checks and Build Only Pull Requests.

To view the current default branch, you can use the API endpoint under default_branch:
https://circleci.com/api/v1.1/project/{VCS}/{ORGNAME}{PROJECT}/info

 

Example:
https://circleci.com/api/v1.1/project/github/CircleCI-Public/circleci-cli/info  


You can re-establish the correct default branch on CircleCI by removing/re-adding the project with the following steps:

1. Remove all CircleCI webhooks and services from your GitHub repo settings.
2. Tell the project to stop building on CircleCI through "Project settings".
3. Add the project back on CircleCI.

This will update CircleCI with the correct default branch information.

 

If you would prefer we refresh your VCS information on our end, please submit a ticket to Support or write to support@circleci.com.

Was this article helpful?
4 out of 12 found this helpful

Comments

0 comments

Article is closed for comments.