Skip to content

Commit d12d35a

Browse files
swissspidyclaude
andcommitted
Merge branch 'main' into add/block-search-command
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
2 parents 1c00b5d + 83a456e commit d12d35a

5 files changed

Lines changed: 70 additions & 21 deletions

File tree

‎.github/workflows/copilot-setup-steps.yml‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ jobs:
4646
id: check_behat_file
4747
run: echo "files_exists=$(test -f behat.yml && echo true || echo false)" >> "$GITHUB_OUTPUT"
4848

49-
# Downloading and starting the database server is the slowest part of the
50-
# setup and it is independent of PHP and Composer, so it runs in the
51-
# background and is waited for right before the test database is prepared.
49+
# Not run in the background: Copilot code review builds its workflow from
50+
# these steps and failed validation while they used `background` and
51+
# `wait-all`. Also, the action unpacks its binaries with the system `tar`,
52+
# which fails to load libpcre2 while setup-php upgrades it with apt.
5253
- name: Setup MySQL Server
5354
if: steps.check_behat_file.outputs.files_exists == 'true'
54-
background: true
55-
uses: shogo82148/actions-setup-mysql@1d4ebc60ba1227dd13fc7e6ba845bd3997928d75 # v1
55+
uses: shogo82148/actions-setup-mysql@13a38f2af408e58a0c80168fc620a63a15357339 # v1
5656
with:
5757
mysql-version: '8.0' # Standard MySQL version for these tests
5858
auto-start: true
@@ -62,7 +62,7 @@ jobs:
6262

6363
- name: Set up PHP environment
6464
if: steps.check_composer_file.outputs.files_exists == 'true'
65-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
65+
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
6666
with:
6767
php-version: 'latest'
6868
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
@@ -77,9 +77,6 @@ jobs:
7777
env:
7878
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
7979

80-
- name: Wait for the MySQL server
81-
wait-all:
82-
8380
- name: Remove system MySQL binary
8481
if: steps.check_behat_file.outputs.files_exists == 'true'
8582
run: sudo rm -f /usr/bin/mysql /usr/bin/mysqldump
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Milestone Merged Pull Requests
3+
4+
'on':
5+
pull_request_target:
6+
types: [closed]
7+
branches:
8+
- main
9+
- master
10+
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
jobs:
16+
milestone:
17+
uses: wp-cli/.github/.github/workflows/reusable-milestone-merged-prs.yml@main

‎AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This package is part of WP-CLI, the official command line interface for WordPress. For a detailed explanation of the project structure and development workflow, please refer to the main @README.md file.
44

5+
If the repository contains an @AGENTS.local.md file, read it as well. It holds instructions specific to this repository and takes precedence over this file where the two disagree.
6+
57
## Best Practices for Code Contributions
68

79
When contributing to this package, please adhere to the following guidelines:

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"require-dev": {
1212
"wp-cli/entity-command": "^2 || ^3",
1313
"wp-cli/extension-command": "^2 || ^3",
14-
"wp-cli/wp-cli-tests": "^5"
14+
"wp-cli/wp-cli-tests": "^5.4.0"
1515
},
1616
"config": {
1717
"process-timeout": 7200,

‎features/block-template.feature‎

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ Feature: Block template commands
33
@require-wp-5.9
44
Scenario: List block templates
55
Given a WP install
6-
And I try `wp theme install twentytwentyfour --activate`
6+
And these installed and active themes:
7+
"""
8+
twentytwentyfour
9+
"""
710

811
When I run `wp block template list --format=count`
912
Then STDOUT should be a number
@@ -17,7 +20,10 @@ Feature: Block template commands
1720
@require-wp-5.9
1821
Scenario: List template parts
1922
Given a WP install
20-
And I try `wp theme install twentytwentyfour --activate`
23+
And these installed and active themes:
24+
"""
25+
twentytwentyfour
26+
"""
2127

2228
When I run `wp block template list --type=wp_template_part --format=count`
2329
Then STDOUT should be a number
@@ -28,15 +34,21 @@ Feature: Block template commands
2834
@require-wp-5.9
2935
Scenario: Filter templates by source
3036
Given a WP install
31-
And I try `wp theme install twentytwentyfour --activate`
37+
And these installed and active themes:
38+
"""
39+
twentytwentyfour
40+
"""
3241

3342
When I run `wp block template list --source=theme --format=count`
3443
Then STDOUT should be a number
3544

3645
@require-wp-5.9
3746
Scenario: Filter templates by slug
3847
Given a WP install
39-
And I try `wp theme install twentytwentyfour --activate`
48+
And these installed and active themes:
49+
"""
50+
twentytwentyfour
51+
"""
4052

4153
# Filter by single slug
4254
When I run `wp block template list --slug=index --field=slug`
@@ -52,7 +64,10 @@ Feature: Block template commands
5264
@require-wp-5.9
5365
Scenario: Filter template parts by area
5466
Given a WP install
55-
And I try `wp theme install twentytwentyfour --activate`
67+
And these installed and active themes:
68+
"""
69+
twentytwentyfour
70+
"""
5671

5772
When I run `wp block template list --type=wp_template_part --area=header --field=slug`
5873
Then STDOUT should contain:
@@ -63,7 +78,10 @@ Feature: Block template commands
6378
@require-wp-5.9
6479
Scenario: Get a block template
6580
Given a WP install
66-
And I try `wp theme install twentytwentyfour --activate`
81+
And these installed and active themes:
82+
"""
83+
twentytwentyfour
84+
"""
6785

6886
# Get the first template ID
6987
When I run `wp block template list --field=id`
@@ -91,7 +109,10 @@ Feature: Block template commands
91109
@require-wp-5.9
92110
Scenario: Export template to stdout
93111
Given a WP install
94-
And I try `wp theme install twentytwentyfour --activate`
112+
And these installed and active themes:
113+
"""
114+
twentytwentyfour
115+
"""
95116

96117
# Get the first template ID using %s pattern to capture first line
97118
When I run `wp block template list --field=id`
@@ -130,7 +151,10 @@ Feature: Block template commands
130151
@require-wp-5.9
131152
Scenario: Export template to file
132153
Given a WP install
133-
And I try `wp theme install twentytwentyfour --activate`
154+
And these installed and active themes:
155+
"""
156+
twentytwentyfour
157+
"""
134158

135159
When I run `wp block template list --field=id`
136160
Then STDOUT should not be empty
@@ -159,7 +183,10 @@ Feature: Block template commands
159183
@require-wp-5.9
160184
Scenario: Filter template parts by invalid area returns empty
161185
Given a WP install
162-
And I try `wp theme install twentytwentyfour --activate`
186+
And these installed and active themes:
187+
"""
188+
twentytwentyfour
189+
"""
163190

164191
When I run `wp block template list --type=wp_template_part --area=nonexistent --format=count`
165192
Then STDOUT should be:
@@ -170,7 +197,10 @@ Feature: Block template commands
170197
@require-wp-5.9
171198
Scenario: Export template creates subdirectories
172199
Given a WP install
173-
And I try `wp theme install twentytwentyfour --activate`
200+
And these installed and active themes:
201+
"""
202+
twentytwentyfour
203+
"""
174204

175205
When I run `wp block template list --field=id`
176206
Then STDOUT should not be empty
@@ -186,7 +216,10 @@ Feature: Block template commands
186216
@require-wp-5.9
187217
Scenario: Export fails when both --file and --dir are provided
188218
Given a WP install
189-
And I try `wp theme install twentytwentyfour --activate`
219+
And these installed and active themes:
220+
"""
221+
twentytwentyfour
222+
"""
190223

191224
When I run `wp block template list --field=id`
192225
Then STDOUT should not be empty

0 commit comments

Comments
 (0)