Skip to content

Commit d06573e

Browse files
swissspidyclaude
andcommitted
Merge branch 'main' into feature/block-convert
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
2 parents 27d5c9c + 83a456e commit d06573e

7 files changed

Lines changed: 98 additions & 30 deletions

File tree

‎.github/actionlint.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@ paths:
1111
# catching genuine typos in permission names.
1212
# See https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli-in-actions
1313
- 'unknown permission scope "copilot-requests"'
14+
# Steps can run in parallel through the `background`, `wait`, `wait-all`,
15+
# `cancel` and `parallel` keywords, but actionlint does not know them yet:
16+
# it rejects `background` as an unexpected key, and a `wait-all` or
17+
# `parallel` step as one that has neither `run` nor `uses`. Drop these
18+
# entries once actionlint supports the keywords. Until then, a step that is
19+
# genuinely missing both `run` and `uses` is no longer reported.
20+
# See https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsparallel
21+
- 'unexpected key "background" for step'
22+
- 'step must run script with "run" section or run action with "uses" section'

‎.github/dependabot.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ updates:
99
- scope:distribution
1010
cooldown:
1111
default-days: 7
12+
# Packages from our own org are trusted, so they are updated immediately.
13+
exclude:
14+
- "wp-cli/*"
1215
# Only wp-cli-tests carries a package.json, holding the pinned version of the
1316
# Gherkin linter. This is a no-op in every other repository.
1417
- package-ecosystem: npm

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

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,40 +39,44 @@ jobs:
3939
id: check_composer_file
4040
run: echo "files_exists=$(test -f composer.json && echo true || echo false)" >> "$GITHUB_OUTPUT"
4141

42-
- name: Set up PHP environment
43-
if: steps.check_composer_file.outputs.files_exists == 'true'
44-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
45-
with:
46-
php-version: 'latest'
47-
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
48-
coverage: 'none'
49-
tools: composer,cs2pr
50-
env:
51-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
53-
- name: Install Composer dependencies & cache dependencies
54-
if: steps.check_composer_file.outputs.files_exists == 'true'
55-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
56-
env:
57-
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
58-
5942
# Without a database the Behat runner silently falls back to SQLite, so the
6043
# agent's test runs are not the ones CI will do. Mirrors the setup in
6144
# reusable-functional.yml.
6245
- name: Check existence of behat.yml file
6346
id: check_behat_file
6447
run: echo "files_exists=$(test -f behat.yml && echo true || echo false)" >> "$GITHUB_OUTPUT"
6548

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.
6653
- name: Setup MySQL Server
6754
if: steps.check_behat_file.outputs.files_exists == 'true'
68-
uses: shogo82148/actions-setup-mysql@62da9377d83991fce27b6ed2a397d3306121e41d # v1
55+
uses: shogo82148/actions-setup-mysql@13a38f2af408e58a0c80168fc620a63a15357339 # v1
6956
with:
7057
mysql-version: '8.0' # Standard MySQL version for these tests
7158
auto-start: true
7259
root-password: ${{ env.WP_CLI_TEST_DBROOTPASS }}
7360
user: ${{ env.WP_CLI_TEST_DBUSER }}
7461
password: ${{ env.WP_CLI_TEST_DBPASS }}
7562

63+
- name: Set up PHP environment
64+
if: steps.check_composer_file.outputs.files_exists == 'true'
65+
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
66+
with:
67+
php-version: 'latest'
68+
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
69+
coverage: 'none'
70+
tools: composer,cs2pr
71+
env:
72+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
74+
- name: Install Composer dependencies & cache dependencies
75+
if: steps.check_composer_file.outputs.files_exists == 'true'
76+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
77+
env:
78+
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
79+
7680
- name: Remove system MySQL binary
7781
if: steps.check_behat_file.outputs.files_exists == 'true'
7882
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
@@ -10,7 +10,7 @@
1010
},
1111
"require-dev": {
1212
"wp-cli/extension-command": "^2 || ^3",
13-
"wp-cli/wp-cli-tests": "^5"
13+
"wp-cli/wp-cli-tests": "^5.4.0"
1414
},
1515
"config": {
1616
"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)