Details
-
Suggestion
-
Resolution: Won't Fix
Description
Pipelines have a set of default variables (listed [here|https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/)] which provide information to the build such as branch name, build number, etc.
It would be nice to have a new default variable added that communicates whether the current branch is the main branch. We have a custom Pipe which has logic that depends on whether or not the current branch is the main branch. Currently, we just check whether BITBUCKET_BRANCH is set to "main" or "master" but this breaks if a repo has a non-traditionally named main branch).
Please add a default variable (for example, BITBUCKET_IS_MAIN_BRANCH: "true"|"false") that contains this value.