Skip to content

Commit

Permalink
Merge branch 'trunk' into add/avif-support
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsilverstein committed Feb 2, 2024
2 parents c2b6df1 + 2a494ac commit 9f884c1
Show file tree
Hide file tree
Showing 162 changed files with 7,743 additions and 6,096 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
os: [ ubuntu-latest ]
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.1', '8.2' ]
db-version: [ '5.7', '8.0', '8.1', '8.2', '8.3' ]
multisite: [ false, true ]
memcached: [ false ]

Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/props-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Props Bot

on:
# This event runs anytime a PR is (re)opened, updated, or labeled.
# GitHub does not allow filtering the `labeled` event by a specific label.
# However, the logic below will short-circuit the workflow when the `props-bot` label is not the one being added.
# Note: The pull_request_target event is uesed instead of pull_request because this workflow needs permission to comment
# on the pull request. Because this event grants extra permissions to `GITHUB_TOKEN`, any code changes within the PR
# should be considered untrusted. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.
pull_request_target:
types:
- opened
- synchronize
- reopened
- labeled
# This event runs anytime a comment is added or deleted.
# You cannot filter this event for PR comments only.
# However, the logic below does short-circuit the workflow for issues.
issue_comment:
type:
- created
- deleted
# This event will run everytime a new PR review is initially submitted.
pull_request_review:
types:
- submitted
# This event runs anytime a PR review comment is created or deleted.
pull_request_review_comment:
types:
- created
- deleted

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ contains( fromJSON( '["pull_request_target", "pull_request_review", "pull_request_review_comment"]' ), github.event_name ) && github.head_ref || github.sha }}
cancel-in-progress: true

# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
permissions: {}

jobs:
# Compiles a list of props for a pull request.
#
# Performs the following steps:
# - Collects a list of contributor props and leaves a comment.
# - Removes the props-bot label, if necessary.
props-bot:
name: Generate a list of props
runs-on: ubuntu-latest
permissions:
# The action needs permission `write` permission for PRs in order to add a comment.
pull-requests: write
contents: read
timeout-minutes: 20
# The job should only run if:
#
# - A pull request review is created or commented on.
# - An issue comment is added to a pull request.
# - A pull request is opened, synchronized, or reopened.
# - The `props-bot` label is added to the pull request.
if: |
contains( fromJSON( '["pull_request_review", "pull_request_review_comment"]' ), github.event_name ) ||
( github.event_name == 'issue_comment' && github.event.issue.pull_request ) ||
github.event_name == 'pull_request_target' && github.event.action != 'labeled' ||
'props-bot' == github.event.label.name
steps:
- name: Gather a list of contributors
uses: WordPress/props-bot-action@trunk

- name: Remove the props-bot label
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: ${{ github.event.action == 'labeled' && 'props-bot' == github.event.label.name }}
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: '${{ github.event.number }}',
name: 'props-bot'
});
2 changes: 2 additions & 0 deletions .version-support-mysql.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"6-5": [
"8.3",
"8.2",
"8.1",
"8.0",
"5.7",
"5.6",
Expand Down
12 changes: 8 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1559,14 +1559,18 @@ module.exports = function(grunt) {
} );

/**
* Build assertions for the lack of source maps in JavaScript files.
* Compiled JavaScript files may link to sourcemaps. In some cases,
* the source map may not be available, which can cause 404 errors when
* browsers try to download the sourcemap from the referenced URLs.
* Ensure that sourcemap links are not included in JavaScript files.
*
* @ticket 24994
* @ticket 46218
* @ticket 60348
*/
grunt.registerTask( 'verify:source-maps', function() {
const ignoredFiles = [
'build/wp-includes/js/dist/components.js'
'build/wp-includes/js/dist/components.js',
];
const files = buildFiles.reduce( ( acc, path ) => {
// Skip excluded paths and any path that isn't a file.
Expand All @@ -1589,10 +1593,10 @@ module.exports = function(grunt) {
encoding: 'utf8',
} );
// `data:` URLs are allowed:
const match = contents.match( /sourceMappingURL=((?!data:).)/ );
const doesNotHaveSourceMap = ! /^\/\/# sourceMappingURL=((?!data:).)/m.test(contents);

assert(
match === null,
doesNotHaveSourceMap,
`The ${ file } file must not contain a sourceMappingURL.`
);
} );
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ext-dom": "*"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.7.2",
"squizlabs/php_codesniffer": "3.8.1",
"wp-coding-standards/wpcs": "~3.0.1",
"phpcompatibility/phpcompatibility-wp": "~2.1.3",
"yoast/phpunit-polyfills": "^1.1.0"
Expand Down
Loading

0 comments on commit 9f884c1

Please sign in to comment.