Skip to content

Commit 55b5880

Browse files
authored
Merge pull request #162 from wp-cli/fix-label-generation
Fix GitHub settings label generation; ensure default labels are kept
2 parents 1fe0c70 + 28e29a1 commit 55b5880

File tree

3 files changed

+48
-24
lines changed

3 files changed

+48
-24
lines changed

.github/settings.yml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
# Used by Probot Settings: https://probot.github.io/apps/settings/
22
repository:
33
description: Scaffolds WP-CLI commands with functional tests, full README.md, and more.
4-
labels:
5-
- name: scope:documentation
6-
color: 0e8a16
7-
- name: scope:testing
8-
color: 5319e7
9-
- name: good-first-issue
10-
color: eb6420
11-
- name: state:unconfirmed
12-
color: bfe5bf
13-
- name: state:unsupported
14-
color: bfe5bf
15-
- name: command:scaffold-package
16-
color: c5def5
17-
- name: command:scaffold-package-tests
18-
color: c5def5
19-
- name: command:scaffold-package-readme
20-
color: c5def5
21-
- name: command:scaffold-package-github
22-
color: c5def5
4+
labels:
5+
- name: bug
6+
color: fc2929
7+
- name: scope:documentation
8+
color: 0e8a16
9+
- name: scope:testing
10+
color: 5319e7
11+
- name: good-first-issue
12+
color: eb6420
13+
- name: help-wanted
14+
color: 159818
15+
- name: maybelater
16+
color: c2e0c6
17+
- name: state:unconfirmed
18+
color: bfe5bf
19+
- name: state:unsupported
20+
color: bfe5bf
21+
- name: wontfix
22+
color: c2e0c6
23+
- name: command:scaffold-package
24+
color: c5def5
25+
- name: command:scaffold-package-tests
26+
color: c5def5
27+
- name: command:scaffold-package-readme
28+
color: c5def5
29+
- name: command:scaffold-package-github
30+
color: c5def5

src/ScaffoldPackageCommand.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ public function package_github( $args, $assoc_args ) {
434434
'description' => '',
435435
'has_labels' => true,
436436
'labels' => array(
437+
array(
438+
'name' => 'bug',
439+
'color' => 'fc2929'
440+
),
437441
array(
438442
'name' => 'scope:documentation',
439443
'color' => '0e8a16'
@@ -446,6 +450,14 @@ public function package_github( $args, $assoc_args ) {
446450
'name' => 'good-first-issue',
447451
'color' => 'eb6420',
448452
),
453+
array(
454+
'name' => 'help-wanted',
455+
'color' => '159818',
456+
),
457+
array(
458+
'name' => 'maybelater',
459+
'color' => 'c2e0c6',
460+
),
449461
array(
450462
'name' => 'state:unconfirmed',
451463
'color' => 'bfe5bf'
@@ -454,6 +466,10 @@ public function package_github( $args, $assoc_args ) {
454466
'name' => 'state:unsupported',
455467
'color' => 'bfe5bf'
456468
),
469+
array(
470+
'name' => 'wontfix',
471+
'color' => 'c2e0c6',
472+
),
457473
),
458474
);
459475
if ( ! empty( $composer_obj['description'] ) ) {

templates/github-settings.mustache

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ repository:
44
description: {{description}}
55
{{/has_description}}
66
{{#has_labels}}
7-
labels:
8-
{{#labels}}
9-
- name: {{name}}
10-
color: {{color}}
11-
{{/labels}}
7+
labels:
8+
{{#labels}}
9+
- name: {{name}}
10+
color: {{color}}
11+
{{/labels}}
1212
{{/has_labels}}

0 commit comments

Comments
 (0)