wp-cli / scaffold-package-command

Scaffolds WP-CLI commands with functional tests, full README.md, and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support alternate default branches for CI badge

danielbachhuber opened this issue · comments

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.

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

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