roots / trellis

WordPress LEMP stack with PHP 8.2, Composer, WP-CLI and more
https://roots.io/trellis/
MIT License
2.51k stars 607 forks source link

Feature Request: Add variable to use default branch. #1312

Closed hemangajmera closed 3 years ago

hemangajmera commented 3 years ago

Summary

Currently if branch is not defined, master is used as default branch for all the sites. This can be made configurable as now-a-days main is the default branch instead of master. We can easily add this at all sites, but it might be good to have it in variable outside.

Motivation

Why are we doing this?

May be in future the default for trellis itself can change from master to main. This will helpful

What use cases does it support?

One can use main as default branch instead of master

What is the expected outcome?

Default branch is configurable.

Potential conflicts / foreseeable issues

None

Additional Context

https://www.thehindubusinessline.com/info-tech/microsoft-google-to-replace-coding-terms-such-as-masterslave-amid-black-live-matters-movement/article31831832.ece

swalkinshaw commented 3 years ago

The branch can be customized through the branch variable already. It's used here: https://github.com/roots/trellis/blob/17430191bb7211545eb63ba3ba989ee95c262c5f/roles/deploy/defaults/main.yml#L5

https://github.com/roots/trellis/pull/1204

That should satisfy this feature request unless I'm missing something.

hemangajmera commented 3 years ago

@swalkinshaw Thanks. was expecting default_branch. But this should also server the purpose.