Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alternate default branches for CI badge #204

Closed
danielbachhuber opened this issue Aug 8, 2022 · 2 comments · Fixed by #206
Closed

Support alternate default branches for CI badge #204

danielbachhuber opened this issue Aug 8, 2022 · 2 comments · Fixed by #206

Comments

@danielbachhuber
Copy link
Member

danielbachhuber commented Aug 8, 2022

CI badge generation is currently hardcoded to master:

if ( file_exists( $package_dir . '/.travis.yml' ) ) {
$shields[] = "[![Build Status](https://travis-ci.org/{$readme_args['package_name']}.svg?branch=master)](https://travis-ci.org/{$readme_args['package_name']})";
}
if ( file_exists( $package_dir . '/circle.yml' ) ) {
$shields[] = "[![CircleCI](https://circleci.com/gh/{$readme_args['package_name']}/tree/master.svg?style=svg)](https://circleci.com/gh/{$readme_args['package_name']}/tree/master)";
}

This repo now uses main. trunk is also common.

Done is:

  • There's a flag to manually specify the preferred 'main' branch for the package.
@wojsmol
Copy link
Contributor

wojsmol commented Aug 8, 2022

@danielbachhuber Detecting for all setups wee be hard but we can add a parameter and set default value to for example main.

@danielbachhuber
Copy link
Member Author

@wojsmol I'm fine with skipping the "default branch detection".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants