Skip to content

Commit 2d3326f

Browse files
authored
Merge branch 'WordPress:trunk' into 54915-rtl-inputs
2 parents c9b7b21 + 7e36c64 commit 2d3326f

File tree

1,366 files changed

+91546
-37509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,366 files changed

+91546
-37509
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "WordPress Core Development",
44
"dockerComposeFile": "docker-compose.yml",
55
"service": "app",
6-
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
"workspaceFolder": "/workspace",
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
99
"features": {

.devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
WORDPRESS_DB_PASSWORD: examplepass
1313
WORDPRESS_DB_NAME: exampledb
1414
volumes:
15-
- ../..:/workspaces:cached
15+
- ..:/workspace:cached
1616

1717
db:
1818
image: mariadb

.devcontainer/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else
99
fi
1010

1111
# Install dependencies
12-
cd /workspaces/wordpress-develop
12+
cd /workspace
1313
npm install && npm run build:dev
1414

1515
# Install WordPress and activate the plugin/theme.

.eslintignore

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1-
# Files and folders related to build/test tools
1+
# Files and folders related to build/test tools including generated files
22
/build
33
/node_modules
44
/tests
55
/vendor
66
/tools
7+
/jsdoc
8+
/artifacts
9+
/coverage
10+
.cache/*
11+
/src/wp-includes/blocks/**/*.js
12+
/src/wp-includes/blocks/**/*.js.map
13+
/src/wp-admin/js
14+
/src/wp-includes/js
715

816
# Excluded files and folders based on `jsdoc.conf.json` exclusions
917
/src/js/_enqueues/vendor
1018

11-
# Webpack built files
12-
/src/wp-includes/js/media-*
13-
1419
# Themes
15-
src/wp-content/themes/
20+
src/wp-content/themes
21+
22+
# Files and folders that get created in wp-content
23+
/src/wp-content/plugins
24+
/src/wp-content/mu-plugins
25+
/src/wp-content/upgrade
26+
/src/wp-content/uploads

.git-blame-ignore-revs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,17 @@ f4f1b4821342fd1d58708356b3ec39d6fefe31ac # [33411]
4848

4949
# Coding Standards
5050
8f95800d52c1736d651ae6e259f90ad4a0db2c3f # [42343]
51+
52+
# 6.8 Coding Standards
53+
a4d6fb7c96cb46859e6d48a5d4c06fdeea7d039b # [59292]
54+
9dd87b8f91300917447c271968d3c36289b440e8 # [59558]
55+
# 903b1fe840d4232bbc249d32d8981824e5fa71de # [59953] includes a punctuation change
56+
a96fa164b00ed51c7c0481574834cff92ab9b1f0 # [60043]
57+
7607cbc5d1e770451f1a2b61d851820dfa23bb43 # [60044]
58+
7047a91c0ecdbf43d4a7a0a591464cd1ed2f2c4b # [60046]
59+
1aa6da693ad739b78752a55d154cd48cb757b90b # [60047]
60+
d44e1c2ce2dc638e89ed6a1d02b1cfadb8a15fe7 # [60048]
61+
a18719e7ea49ab7ac0091e076840cb7efdf51cc5 # [60049]
62+
63+
# 6.9 Coding Standards
64+
cbb6519119276ceba4279eaee73ab66294ebd820 # [60402]

.github/dependabot.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Checks for uncommitted changes to built files in pull requests.
2+
name: Check Built Files (PRs)
3+
4+
on:
5+
# Because all commits happen through SVN and should always be manually reviewed by a committer, this workflow only
6+
# runs for pull requests.
7+
#
8+
# Other workflows that run for the push event will detect changes to versioned files and fail.
9+
pull_request:
10+
branches:
11+
- trunk
12+
- '6.[8-9]'
13+
- '[7-9].[0-9]'
14+
paths:
15+
# Any change to a CSS, JavaScript, JSON, or SASS file should run checks.
16+
- '**.css'
17+
- '**.js'
18+
- '**.json'
19+
- '**.sass'
20+
# These files configure npm and the task runner. Changes could affect the outcome.
21+
- 'package*.json'
22+
- '.npmrc'
23+
- '.nvmrc'
24+
- 'Gruntfile.js'
25+
- 'webpack.config.js'
26+
- 'tools/webpack/**'
27+
# These files configure Composer. Changes could affect the outcome.
28+
- 'composer.*'
29+
# Confirm any changes to relevant workflow files.
30+
- '.github/workflows/check-built-files.yml'
31+
# Changes to the default themes should be handled by the themes workflows.
32+
- '!src/wp-content/themes/twenty**'
33+
34+
# Cancels all previous workflow runs for pull requests that have not completed.
35+
concurrency:
36+
# The concurrency group contains the workflow name and the branch name for pull requests
37+
# or the commit hash for any other events.
38+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
39+
cancel-in-progress: true
40+
41+
# Disable permissions for all available scopes by default.
42+
# Any needed permissions should be configured at the job level.
43+
permissions: {}
44+
45+
jobs:
46+
check-for-built-file-changes:
47+
name: Check built files
48+
if: ${{ github.repository == 'wordpress/wordpress-develop' }}
49+
uses: ./.github/workflows/reusable-check-built-files.yml
50+
permissions:
51+
contents: read

.github/workflows/coding-standards.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ on:
99
- '3.[89]'
1010
- '[4-9].[0-9]'
1111
tags:
12-
- '[0-9]+.[0-9]'
13-
- '[0-9]+.[0-9].[0-9]+'
14-
- '!3.7.[0-9]+'
12+
- '3.[89]'
13+
- '3.[89].[0-9]+'
14+
- '[4-9].[0-9]'
15+
- '[4-9].[0-9].[0-9]+'
1516
pull_request:
1617
branches:
1718
- trunk
@@ -23,6 +24,8 @@ on:
2324
- '**.php'
2425
# These files configure npm. Changes could affect the outcome.
2526
- 'package*.json'
27+
- '.npmrc'
28+
- '.nvmrc'
2629
# These files configure Composer. Changes could affect the outcome.
2730
- 'composer.*'
2831
# This file configures JSHint. Changes could affect the outcome.
@@ -48,23 +51,23 @@ permissions: {}
4851
jobs:
4952
# Runs the PHP coding standards checks.
5053
phpcs:
51-
name: PHP coding standards
52-
uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
54+
name: Coding standards
55+
uses: ./.github/workflows/reusable-coding-standards-php.yml
5356
permissions:
5457
contents: read
5558
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
5659

5760
# Runs the JavaScript coding standards checks.
5861
jshint:
59-
name: JavaScript coding standards
60-
uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
62+
name: Coding standards
63+
uses: ./.github/workflows/reusable-coding-standards-javascript.yml
6164
permissions:
6265
contents: read
6366
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
6467

6568
slack-notifications:
6669
name: Slack Notifications
67-
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
70+
uses: ./.github/workflows/slack-notifications.yml
6871
permissions:
6972
actions: read
7073
contents: read
@@ -80,7 +83,7 @@ jobs:
8083

8184
failed-workflow:
8285
name: Failed workflow tasks
83-
runs-on: ubuntu-latest
86+
runs-on: ubuntu-24.04
8487
permissions:
8588
actions: write
8689
needs: [ phpcs, jshint, slack-notifications ]
@@ -107,6 +110,6 @@ jobs:
107110
workflow_id: 'failed-workflow.yml',
108111
ref: 'trunk',
109112
inputs: {
110-
run_id: '${{ github.run_id }}'
113+
run_id: `${context.runId}`,
111114
}
112115
});
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# Commits all missed changes to built files back to pull request branches.
2+
name: Commit Built File Changes (PRs)
3+
4+
on:
5+
workflow_run:
6+
workflows:
7+
- 'Check Built Files (PRs)'
8+
- 'Test Default Themes & Create ZIPs'
9+
types:
10+
- completed
11+
12+
# Cancels all previous workflow runs for pull requests that have not completed.
13+
concurrency:
14+
# The concurrency group contains the workflow name and the branch name for pull requests
15+
# or the commit hash for any other events.
16+
group: ${{ github.workflow }}-${{ github.event_name == 'workflow_run' && format( '{0}-{1}', github.event.workflow_run.head_branch, github.event.workflow_run.head_repository.name ) || github.sha }}
17+
18+
# Disable permissions for all available scopes by default.
19+
# Any needed permissions should be configured at the job level.
20+
permissions: {}
21+
22+
jobs:
23+
# Checks a PR for uncommitted changes to built files.
24+
#
25+
# Performs the following steps:
26+
# - Attempts to download the artifact containing the PR diff.
27+
# - Checks for the existence of an artifact.
28+
# - Unzips the artifact.
29+
# - Generates a token for authenticating with the GitHub App.
30+
# - Checks out the repository.
31+
# - Applies the patch file.
32+
# - Displays the result of git diff.
33+
# - Configures the Git author.
34+
# - Stages changes.
35+
# - Commits changes.
36+
# - Pushes changes.
37+
update-built-files:
38+
name: Check and update built files
39+
runs-on: ubuntu-24.04
40+
if: ${{ github.repository == 'wordpress/wordpress-develop' }}
41+
timeout-minutes: 10
42+
permissions:
43+
contents: write
44+
steps:
45+
- name: Download artifact
46+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
47+
with:
48+
script: |
49+
const artifacts = await github.rest.actions.listWorkflowRunArtifacts( {
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
run_id: process.env.RUN_ID,
53+
} );
54+
55+
const matchArtifact = artifacts.data.artifacts.filter( ( artifact ) => {
56+
return artifact.name === 'pr-built-file-changes'
57+
} )[0];
58+
59+
if ( ! matchArtifact ) {
60+
core.info( 'No artifact found!' );
61+
return;
62+
}
63+
64+
const download = await github.rest.actions.downloadArtifact( {
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
artifact_id: matchArtifact.id,
68+
archive_format: 'zip',
69+
} );
70+
71+
const fs = require( 'fs' );
72+
fs.writeFileSync( '${{ github.workspace }}/pr-built-file-changes.zip', Buffer.from( download.data ) )
73+
env:
74+
RUN_ID: ${{ github.event.workflow_run.id }}
75+
76+
- name: Check for artifact
77+
id: artifact-check
78+
run: |
79+
if [ -f "pr-built-file-changes.zip" ]; then
80+
echo "exists=true" >> "$GITHUB_OUTPUT"
81+
else
82+
echo "exists=false" >> "$GITHUB_OUTPUT"
83+
fi
84+
85+
- name: Unzip the artifact containing the PR data
86+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
87+
run: unzip pr-built-file-changes.zip
88+
89+
- name: Generate Installation Token
90+
id: generate_token
91+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
92+
env:
93+
GH_APP_ID: ${{ secrets.GH_PR_BUILT_FILES_APP_ID }}
94+
GH_APP_PRIVATE_KEY: ${{ secrets.GH_PR_BUILT_FILES_PRIVATE_KEY }}
95+
run: |
96+
echo "$GH_APP_PRIVATE_KEY" > private-key.pem
97+
98+
# Generate JWT
99+
JWT=$(python3 - <<EOF
100+
import jwt, time
101+
private_key = open("private-key.pem", "r").read()
102+
payload = {
103+
"iat": int(time.time()),
104+
"exp": int(time.time()) + 600, # 10-minute expiration
105+
"iss": $GH_APP_ID
106+
}
107+
print(jwt.encode(payload, private_key, algorithm="RS256"))
108+
EOF
109+
)
110+
111+
# Get Installation ID
112+
INSTALLATION_ID=$(curl -s -X GET -H "Authorization: Bearer $JWT" \
113+
-H "Accept: application/vnd.github.v3+json" \
114+
https://api.github.com/app/installations | jq -r '.[0].id')
115+
116+
# Request Installation Access Token
117+
ACCESS_TOKEN=$(curl -s -X POST -H "Authorization: Bearer $JWT" \
118+
-H "Accept: application/vnd.github.v3+json" \
119+
"https://api.github.com/app/installations/$INSTALLATION_ID/access_tokens" | jq -r '.token')
120+
121+
echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> "$GITHUB_ENV"
122+
123+
rm -f private-key.pem
124+
125+
- name: Checkout repository
126+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
127+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
128+
with:
129+
repository: ${{ github.event.workflow_run.head_repository.full_name }}
130+
ref: ${{ github.event.workflow_run.head_branch }}
131+
path: 'pr-repo'
132+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
133+
token: ${{ env.ACCESS_TOKEN }}
134+
135+
- name: Apply patch
136+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
137+
working-directory: 'pr-repo'
138+
run: git apply ${{ github.workspace }}/changes.diff
139+
140+
- name: Display changes to versioned files
141+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
142+
working-directory: 'pr-repo'
143+
run: git diff
144+
145+
- name: Configure git user name and email
146+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
147+
working-directory: 'pr-repo'
148+
env:
149+
GH_APP_ID: ${{ secrets.GH_PR_BUILT_FILES_APP_ID }}
150+
run: |
151+
git config user.name "wordpress-develop-pr-bot[bot]"
152+
git config user.email ${{ env.GH_APP_ID }}+wordpress-develop-pr-bot[bot]@users.noreply.github.com
153+
154+
- name: Stage changes
155+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
156+
working-directory: 'pr-repo'
157+
run: git add .
158+
159+
- name: Commit changes
160+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
161+
working-directory: 'pr-repo'
162+
run: |
163+
git commit -m "Automation: Updating built files with changes."
164+
165+
- name: Push changes
166+
if: ${{ steps.artifact-check.outputs.exists == 'true' }}
167+
working-directory: 'pr-repo'
168+
run: git push

0 commit comments

Comments
 (0)