Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handle sorting and position column to registered assets #1

Open
wants to merge 36 commits into
base: show-all-assets
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
cb2da1e
save
crstauf Jul 29, 2024
b510565
Merge branch 'show-all-assets' into show-all-assets-sorting
crstauf Jul 29, 2024
da84e4c
save
crstauf Jul 29, 2024
1be5912
save
crstauf Jul 29, 2024
0a03be6
save
crstauf Jul 29, 2024
8dad519
Merge branch 'develop' into show-all-assets-sorting
crstauf Aug 19, 2024
123d825
Merge branch 'show-all-assets' into show-all-assets-sorting
crstauf Sep 25, 2024
3e048ea
Merge branch 'show-all-assets' into show-all-assets-sorting
crstauf Nov 18, 2024
41352b3
Merge branch 'show-all-assets' into show-all-assets-sorting
crstauf Nov 27, 2024
77edd4f
Merge branch 'show-all-assets' into show-all-assets-sorting
crstauf Nov 29, 2024
dc9133b
Docs.
johnbillion Dec 4, 2024
0aa22c0
This is no longer used.
johnbillion Dec 4, 2024
0eeb526
Update this action.
johnbillion Dec 5, 2024
67450c7
Add linting for workflow files.
johnbillion Dec 20, 2024
09be22a
Update this action.
johnbillion Dec 20, 2024
ec40aac
Tighten up these permissions.
johnbillion Dec 20, 2024
aa94fd2
Update this action.
johnbillion Dec 21, 2024
c435c0d
Separate the coding standards and static analysis workflows.
johnbillion Dec 21, 2024
2b1735d
De-duplicate some translator comments.
johnbillion Dec 21, 2024
2ac8d95
Don't need nightly tests for coding standards.
johnbillion Dec 21, 2024
7554a9b
Run this on develop too.
johnbillion Dec 21, 2024
fe3b483
Time for this to go.
johnbillion Dec 24, 2024
514f174
Tighten the workflow permissions.
johnbillion Dec 24, 2024
863e526
Change this branch name.
johnbillion Dec 24, 2024
e3e7420
These inputs are no longer needed.
johnbillion Jan 2, 2025
4bf5d99
Docs.
johnbillion Jan 2, 2025
463c4c6
These scripts are no longer needed.
johnbillion Jan 2, 2025
53c1656
Happy new year.
johnbillion Jan 2, 2025
ddcf8eb
Build provenance attestation now happens directly in plugin-infrastru…
johnbillion Jan 2, 2025
14ef69c
Update some dependencies.
johnbillion Jan 2, 2025
a046459
Fix this path.
johnbillion Jan 2, 2025
d977785
Update sharp.
johnbillion Jan 2, 2025
f312cdd
Update to Node 20.
johnbillion Jan 2, 2025
c49efe7
Don't restrict this scanning based on path.
johnbillion Jan 2, 2025
b7dadca
Updated sponsor info.
johnbillion Jan 4, 2025
7edd18f
Merge branch 'develop' into show-all-assets-sorting
crstauf Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/package-lock.json export-ignore
/package.json export-ignore
/phpcs.xml.dist export-ignore
/phpcs56.xml export-ignore
/phpstan.neon.dist export-ignore
/README.md export-ignore
/SECURITY.md export-ignore
6 changes: 3 additions & 3 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- 'develop'
- 'trunk'
- 'master'
paths:
- '.github/workflows/acceptance-tests.yml'
- 'tests/**'
Expand Down Expand Up @@ -34,12 +33,13 @@ on:
- 'package.json'
workflow_dispatch:

permissions:
contents: read
permissions: {}

jobs:
test:
name: WP ${{ matrix.wp }}
permissions:
contents: read
strategy:
# See the following for PHP compatibility of WordPress versions:
# https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
- 'release'
workflow_dispatch:

permissions:
contents: write
permissions: {}

jobs:
build:
name: Build
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-build.yml@trunk
permissions:
contents: write
with:
node: true
tag: ${{ github.event_name != 'workflow_dispatch' }}
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- 'develop'
- 'trunk'
- 'master'
paths:
- '.github/workflows/coding-standards.yml'
- '**.css'
Expand All @@ -16,7 +15,6 @@ on:
- 'composer.json'
- 'package.json'
- 'phpcs.xml.dist'
- 'phpcs56.yml'
- 'phpstan.neon.dist'
pull_request:
branches:
Expand All @@ -30,24 +28,23 @@ on:
- 'composer.json'
- 'package.json'
- 'phpcs.xml.dist'
- 'phpcs56.yml'
- 'phpstan.neon.dist'
workflow_dispatch:

permissions:
contents: read
permissions: {}

jobs:
test:
name: ${{ matrix.label }}
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-coding-standards.yml@trunk
strategy:
matrix:
label:
- 'PHP'
php:
- '8.4'
- '7.4'
fail-fast: false
with:
php: ${{ matrix.php }}
7 changes: 3 additions & 4 deletions .github/workflows/deploy-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ on:
branches:
- deploy

permissions:
contents: read
permissions: {}

jobs:
wordpress:
name: WordPress.org
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-deploy-assets.yml@trunk
with:
node: true
plugin: query-monitor
readme: readme.txt
vendor: true
secrets:
WPORG_SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }}
WPORG_SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }}
21 changes: 1 addition & 20 deletions .github/workflows/deploy-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ on:

concurrency: WordPress.org

permissions:
attestations: write
contents: read
id-token: write
issues: write
permissions: {}

jobs:
deploy:
Expand All @@ -34,18 +30,3 @@ jobs:
secrets:
WPORG_SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }}
WPORG_SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }}
attest:
name: Generate attestation
runs-on: ubuntu-latest
permissions:
attestations: write
contents: read
id-token: write
timeout-minutes: 70
needs: deploy
steps:
- name: Attest
uses: johnbillion/[email protected]
with:
version: ${{ needs.deploy.outputs.version }}
zip-path: ${{ needs.deploy.outputs.zip-path }}
6 changes: 3 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- 'develop'
- 'trunk'
- 'master'
paths:
- '.github/workflows/integration-tests.yml'
- 'tests/**'
Expand Down Expand Up @@ -34,12 +33,13 @@ on:
- 'package.json'
workflow_dispatch:

permissions:
contents: read
permissions: {}

jobs:
test:
name: WP ${{ matrix.wp }}
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-integration-tests.yml@trunk
strategy:
# See the following for PHP compatibility of WordPress versions:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/lint-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow

name: Lint workflow files
on:
pull_request:
branches:
- '**'
push:
branches:
- develop
- trunk

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
permissions:
security-events: write
actions: read
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-workflow-lint.yml@trunk
23 changes: 8 additions & 15 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,19 @@ on:
- '.github/workflows/nightly-tests.yml'
workflow_dispatch:

permissions:
contents: read
permissions: {}

jobs:
standards:
name: Nightly ${{ matrix.label }}
strategy:
matrix:
label:
- 'standards'
php:
- '8.4'
- '7.4'
fail-fast: false
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-coding-standards.yml@trunk
with:
php: ${{ matrix.php }}
acceptance:
name: Nightly ${{ matrix.label }}
permissions:
contents: read
strategy:
matrix:
label:
- 'acceptance'
php:
# Newest and oldest supported versions of PHP
- '8.4'
- '7.4'
fail-fast: false
Expand All @@ -53,14 +42,18 @@ jobs:
node: true
php: ${{ matrix.php }}
wp: 'nightly'

integration:
name: Nightly ${{ matrix.label }}
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-integration-tests.yml@trunk
strategy:
matrix:
label:
- 'integration'
php:
# Newest and oldest supported versions of PHP
- '8.4'
- '7.4'
fail-fast: false
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow

name: Static Analysis
on:
push:
branches:
- 'develop'
- 'trunk'
paths:
- '.github/workflows/static-analysis.yml'
- '**.php'
- 'composer.json'
- 'phpstan.neon.dist'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/static-analysis.yml'
- '**.php'
- 'composer.json'
- 'phpstan.neon.dist'
workflow_dispatch:

permissions: {}

jobs:
test:
name: ${{ matrix.label }}
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-static-analysis.yml@trunk
strategy:
matrix:
label:
- 'PHP'
php:
- '8.3'
- '7.4'
fail-fast: false
with:
php: ${{ matrix.php }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ To run tests individually, run one of:

The individual integration and acceptance tests require the Docker containers to be running. To start and stop them, use:

composer test:start
composer test:stop
composer exec tests-start
composer exec tests-stop

## Releasing a New Version

Expand All @@ -80,34 +80,34 @@ These are the steps to take to release a new version of Query Monitor (for contr
### Prior to Release

1. Check [the milestone on GitHub](https://github.com/johnbillion/query-monitor/milestones) for open issues or PRs. Fix or reassign as necessary.
1. If this is a non-patch release, check issues and PRs assigned to the patch or minor milestones that will get skipped. Reassign as necessary.
1. If this is a non-patch release, reassign issues and PRs assigned to the patch or minor milestones that will get skipped.
1. Ensure you're on the `develop` branch and all the changes for this release have been merged in.
1. Ensure `README.md` and `readme.txt` contain up to date "Tested up to" versions, descriptions, FAQs, screenshots, etc.
- Query Monitor supports the last nine versions of WordPress (support for versions up to approximately three years old)
1. Ensure `README.md` and `readme.txt` contain up to date "Tested up to" versions, descriptions, FAQs, and screenshots.
1. Ensure `.gitattributes` is up to date with all files that shouldn't be part of the build.
- To do this, run `git archive --output=qm.zip HEAD` then check the contents for files that shouldn't be part of the package.
1. Run `composer test` and ensure everything passes.
1. Run `git push origin develop` (if necessary) and ensure CI is passing.
1. Prepare a changelog for [the Releases page on GitHub](https://github.com/johnbillion/query-monitor/releases).
1. Run `git push origin develop` and ensure CI is passing.
1. Prepare a changelog for the release.

### For Release

1. Bump the plugin version number:
- `npm run bump:patch` for a patch release (1.2.3 => 1.2.4)
- `npm run bump:minor` for a minor release (1.2.3 => 1.3.0)
- `npm run bump:major` for a major release (1.2.3 => 2.0.0)
1. `git push origin develop`
1. `git push origin develop:release`
1. Wait for [the Build action](https://github.com/johnbillion/query-monitor/actions/workflows/build.yml) to complete
1. Enter the changelog into [the release on GitHub](https://github.com/johnbillion/query-monitor/releases) and publish it.
1. Approve the release on [the WordPress.org release management dashboard](https://wordpress.org/plugins/developers/releases/).
1. Enter the changelog into [the release on GitHub](https://github.com/johnbillion/query-monitor/releases) and publish it
1. Approve the release on [the WordPress.org release management dashboard](https://wordpress.org/plugins/developers/releases/)
1. `git push origin develop:trunk`

### Post Release

Publishing a release on GitHub triggers an action which deploys the release to the WordPress.org Plugin Directory. No need to touch Subversion.

New milestones are automatically created for the next major, minor, and patch releases where appropriate.

1. Close the milestone.
1. If this is a non-patch release, manually delete any [unused patch and minor milestones on GitHub](https://github.com/johnbillion/query-monitor/milestones).
1. Check the new version has appeared [on the WordPress.org plugin page](https://wordpress.org/plugins/query-monitor/).
1. Resolve relevant threads on [the plugin's support forums](https://wordpress.org/support/plugin/query-monitor/).
Expand All @@ -117,4 +117,4 @@ New milestones are automatically created for the next major, minor, and patch re

Assets such as screenshots and banners are stored in the `.wordpress-org` directory. These get deployed as part of the automated release process too.

In order to deploy only changes to assets, push the change to the `deploy` branch and they will be deployed if they're the only changes in the branch since the last release. This allows for the "Tested up to" value to be bumped as well as assets to be updated in between releases.
In order to deploy only changes to assets and the readme file, push the change to the `deploy` branch. This allows for the "Tested up to" value to be bumped as well as assets to be updated in between releases. Changes to files other than assets and the readme file will be ignored.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,18 @@ By default, Query Monitor's output is only shown to Administrators on single-sit

In addition to this, you can set an authentication cookie which allows you to view Query Monitor output when you're not logged in, or when you're logged in as a user who cannot usually see Query Monitor's output. See the Settings panel for details.

## Sponsors

The time that I spend maintaining this plugin and others is in part sponsored by:

[![Automattic](https://cdn.jsdelivr.net/gh/johnbillion/johnbillion/assets/sponsors/automattic.png)](https://automattic.com)

Plus all my kind sponsors on GitHub:

[![Sponsors](https://cdn.jsdelivr.net/gh/johnbillion/johnbillion/sponsors.svg)](https://github.com/sponsors/johnbillion)

[Click here to find out about supporting this plugin and my other WordPress development tools and plugins](https://github.com/sponsors/johnbillion).

## Notes

### A Note on Query Monitor's Implementation
Expand Down Expand Up @@ -283,7 +295,7 @@ See also my list of [WordPress Developer Plugins](https://johnblackbourn.com/wor

## Contributing

Code contributions, feedback, and feature suggestions are very welcome. See [CONTRIBUTING.md](https://github.com/johnbillion/query-monitor/blob/master/CONTRIBUTING.md) for more details.
Code contributions, feedback, and feature suggestions are very welcome. See [CONTRIBUTING.md](https://github.com/johnbillion/query-monitor/blob/trunk/CONTRIBUTING.md) for more details.

## Icon

Expand Down
Loading