Skip to content

Commit 274c64f

Browse files
authored
Merge pull request #250 from wp-cli/codecov-shield
2 parents f6093e1 + 9a73ba7 commit 274c64f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ScaffoldPackageCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ public function package_readme( $args, $assoc_args ) {
280280
if ( file_exists( $package_dir . '/.circleci/config.yml' ) ) {
281281
$shields[] = "[![CircleCI](https://circleci.com/gh/{$readme_args['package_name']}/tree/{$branch}.svg?style=svg)](https://circleci.com/gh/{$readme_args['package_name']}/tree/{$branch})";
282282
}
283+
if ( file_exists( $package_dir . '/codecov.yml' ) ) {
284+
$shields[] = "[![Code Coverage](https://codecov.io/gh/{$readme_args['package_name']}/branch/{$branch}/graph/badge.svg)](https://codecov.io/gh/{$readme_args['package_name']}/tree/{$branch})";
285+
}
283286

284287
if ( count( $shields ) ) {
285288
$readme_args['shields'] = implode( ' ', $shields );

0 commit comments

Comments
 (0)