Skip to content

Commit 4ee3e32

Browse files
committed
Fix PR feedback!
2 parents 16ec265 + 1742dc0 commit 4ee3e32

Some content is hidden

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

55 files changed

+2090
-764
lines changed

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"Backbone": "readonly",
1919
"_": "readonly",
2020
"File": "readonly",
21-
"Headers": "readonly"
21+
"Headers": "readonly",
22+
"requestAnimationFrame": "readonly"
2223
},
2324
"extends": ["plugin:@wordpress/eslint-plugin/recommended"],
2425
"ignorePatterns": ["*.json"]
+17-16
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
name: Build release zip
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_dispatch:
65

76
jobs:
87
build_zip:
9-
name: New release
8+
name: Build release zip
109
runs-on: ubuntu-latest
1110
steps:
12-
1311
- name: Checkout code
1412
uses: actions/checkout@v3
15-
16-
- name: Create ZIP
13+
- name: Set Node.js 16.x
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version-file: .nvmrc
17+
- name: npm install and build
1718
run: |
18-
git archive --prefix=classifai/ HEAD -o classifai.zip
19-
20-
- name: Upload release asset
21-
uses: actions/upload-release-asset@v1
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
npm install
20+
npm run build
21+
npm run makepot
22+
composer install --no-dev
23+
npm run archive
24+
- name: Upload the ZIP file as an artifact
25+
uses: actions/upload-artifact@v3
2426
with:
25-
upload_url: ${{ github.event.release.upload_url }}
26-
asset_path: ${{github.workspace}}/classifai.zip
27-
asset_name: classifai.zip
28-
asset_content_type: application/zip
27+
name: ${{ github.event.repository.name }}
28+
path: release
29+
retention-days: 2

.github/workflows/cypress.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
matrix:
1717
core:
1818
- {name: 'WP latest', version: 'latest'}
19-
- {name: 'WP minimum', version: 'WordPress/WordPress#5.7'}
19+
- {name: 'WP minimum', version: 'WordPress/WordPress#5.8'}
20+
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
2021
steps:
2122
- name: Checkout
2223
uses: actions/checkout@v3

.github/workflows/lint.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424
- name: Setup node v16 and npm cache
2525
uses: actions/setup-node@v3
2626
with:
27-
node-version: 16
27+
node-version-file: .nvmrc
2828
cache: npm
2929

3030
- name: Install Node dependencies
3131
run: npm ci --no-optional
3232

3333
- name: Get updated JS files
3434
id: changed-files
35-
uses: tj-actions/changed-files@v35
35+
uses: tj-actions/changed-files@v37
3636
with:
3737
files: |
3838
**/*.js
@@ -78,17 +78,17 @@ jobs:
7878

7979
- name: Get updated PHP files
8080
id: changed-files
81-
uses: tj-actions/changed-files@v35
81+
uses: tj-actions/changed-files@v37
8282
with:
8383
files: |
8484
**/*.php
8585
8686
- name: PHPCS check
8787
run: |
8888
if [[ "${{ steps.changed-files.outputs.any_changed }}" == 'true' && "${{ github.event_name }}" == "pull_request" ]]; then
89-
./vendor/bin/phpcs ${{ steps.changed-files.outputs.all_changed_files }} --runtime-set testVersion 7.4-
89+
./vendor/bin/phpcs ${{ steps.changed-files.outputs.all_changed_files }} -s --runtime-set testVersion 7.4-
9090
elif [[ "${{ github.event_name }}" == "push" ]]; then
91-
./vendor/bin/phpcs . --runtime-set testVersion 7.4-
91+
./vendor/bin/phpcs . -s --runtime-set testVersion 7.4-
9292
fi
9393
9494
vipcs:
@@ -97,7 +97,7 @@ jobs:
9797

9898
steps:
9999
- name: Checkout
100-
uses: actions/checkout@v2
100+
uses: actions/checkout@v3
101101

102102
- name: VIPCS check
103103
uses: 10up/wpcs-action@stable

.github/workflows/release.yml

+17-19
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
1-
name: Build Release
1+
name: Release
2+
23
on:
3-
push:
4-
branches:
5-
- trunk
4+
release:
5+
types: [published]
6+
67
jobs:
78
release:
8-
name: Push (merge) to trunk
9+
name: New release
910
runs-on: ubuntu-latest
1011
steps:
1112
- name: Checkout
1213
uses: actions/checkout@v3
14+
1315
- name: Set Node.js 16.x
1416
uses: actions/setup-node@v3
1517
with:
16-
node-version: 16.x
17-
- name: npm install and build
18+
node-version-file: .nvmrc
19+
20+
- name: Install dependencies, build files and archive
1821
run: |
1922
npm install
2023
npm run build
2124
npm run makepot
2225
composer install --no-dev
2326
npm run archive
24-
- name: Release to Stable
25-
uses: s0/git-publish-subdir-action@develop
27+
28+
- name: Upload release asset
29+
uses: actions/upload-release-asset@v1
2630
env:
27-
REPO: self
28-
BRANCH: stable
29-
FOLDER: release
3031
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
MESSAGE: 'Release: ({sha}) {msg}'
32-
- name: Build docs
33-
run: npm run build:docs
34-
- name: Deploy docs update
35-
uses: peaceiris/actions-gh-pages@v3
3632
with:
37-
github_token: ${{ secrets.GITHUB_TOKEN }}
38-
publish_dir: './docs'
33+
upload_url: ${{ github.event.release.upload_url }}
34+
asset_path: ${{github.workspace}}/classifai.zip
35+
asset_name: classifai.zip
36+
asset_content_type: application/zip

.github/workflows/stable.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release to Stable
2+
on:
3+
push:
4+
branches:
5+
- trunk
6+
jobs:
7+
release:
8+
name: Push (merge) to trunk
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
- name: Set Node.js 16.x
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: 16.x
17+
- name: npm install and build
18+
run: |
19+
npm install
20+
npm run build
21+
npm run makepot
22+
composer install --no-dev
23+
npm run archive
24+
- name: Release to Stable
25+
uses: s0/git-publish-subdir-action@develop
26+
env:
27+
REPO: self
28+
BRANCH: stable
29+
FOLDER: release
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
MESSAGE: 'Release: ({sha}) {msg}'
32+
- name: Build docs
33+
run: npm run build:docs
34+
- name: Deploy docs update
35+
uses: peaceiris/actions-gh-pages@v3
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: './docs'

.github/workflows/wordpress-version-checker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: WordPress version checker
21-
uses: skaut/wordpress-version-checker@master
21+
uses: skaut/wordpress-version-checker@v2.0.0
2222
with:
2323
repo-token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

+40
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,45 @@ All notable changes to this project will be documented in this file, per [the Ke
44

55
## [Unreleased] - TBD
66

7+
## [2.3.0] - 2023-09-05
8+
**Note that this release bumps the WordPress minimum from 5.7 to 5.8.**
9+
10+
### Added
11+
- Ability to resize (expand or condense) text content using OpenAI's ChatGPT API (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul), [@jakemgold](https://github.com/jakemgold) via [#532](https://github.com/10up/classifai/pull/532)).
12+
- Ability to generate excerpts when using the Classic Editor (props [@jamesmorrison](https://github.com/jamesmorrison), [@ravinderk](https://github.com/ravinderk), [@dkotter](https://github.com/dkotter) via [#491](https://github.com/10up/classifai/pull/491)).
13+
- Ability to generate images directly in the Media Library, instead of at a post level, by going to `Media > Generate Images` (props [@phpbits](https://github.com/phpbits), [@dkotter](https://github.com/dkotter) via [#524](https://github.com/10up/classifai/pull/524)).
14+
- Ability to generate images within the Inserter Media tab. As of WordPress 6.3, this requires the latest version of the Gutenberg plugin to work. Also note that image generation requests are sent as soon as you are done typing so you may end up making multiple requests as you type out your prompt (resulting in charges for each request), depending on the typing speed (props [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#535](https://github.com/10up/classifai/pull/535)).
15+
- New display option to control the display of the Text-to-Speech audio controls on the front-end (props [@joshuaabenazer](https://github.com/joshuaabenazer), [@dkotter](https://github.com/dkotter) via [#549](https://github.com/10up/classifai/pull/549)).
16+
- Initial integration with the new Command Palette API (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh), [@ravinderk](https://github.com/ravinderk) via [#536](https://github.com/10up/classifai/pull/536)).
17+
- New `POST` endpoints for title and excerpt generation (props [@phpbits](https://github.com/phpbits), [@dkotter](https://github.com/dkotter) via [#525](https://github.com/10up/classifai/pull/525)).
18+
- New filter, `classifai_chatgpt_allowed_roles`, to allow ChatGPT image role settings to be overridden (props [@bjorn2404](https://github.com/bjorn2404), [@phpbits](https://github.com/phpbits), [@dkotter](https://github.com/dkotter) via [#459](https://github.com/10up/classifai/pull/459)).
19+
- New filter, `classifai_openai_dalle_allowed_image_roles`, to allow DALL·E image role settings to be overridden (props [@bjorn2404](https://github.com/bjorn2404), [@phpbits](https://github.com/phpbits), [@dkotter](https://github.com/dkotter) via [#459](https://github.com/10up/classifai/pull/459)).
20+
- New filter, `classifai_openai_chatgpt_{$feature}`, to allow granular access control for ChatGPT title and excerpt generation (props [@bjorn2404](https://github.com/bjorn2404), [@phpbits](https://github.com/phpbits), [@dkotter](https://github.com/dkotter) via [#459](https://github.com/10up/classifai/pull/459)).
21+
- New filter, `classifai_openai_dalle_enable_image_gen`, to allow granular access control for DALL·E image generation (props [@bjorn2404](https://github.com/bjorn2404), [@phpbits](https://github.com/phpbits), [@dkotter](https://github.com/dkotter) via [#459](https://github.com/10up/classifai/pull/459)).
22+
23+
### Changed
24+
- Bump WordPress minimum from 5.7 to 5.8 (props [@Sidsector9](https://github.com/Sidsector9) via [#532](https://github.com/10up/classifai/pull/532)).
25+
- Bump WordPress "tested up to" version to 6.3 (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#556](https://github.com/10up/classifai/pull/556)).
26+
- Utilize the new `POST` endpoints for title and excerpt generation, ensuring most recent content is always used (props [@phpbits](https://github.com/phpbits), [@dkotter](https://github.com/dkotter) via [#525](https://github.com/10up/classifai/pull/525)).
27+
- Update the IBM Watson NLU API to the `2022-08-10` version (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#543](https://github.com/10up/classifai/pull/543)).
28+
- Update the prompt we send to OpenAI that is used to generate excerpts to try and ensure the excerpts generated pair well with the title of the content (props [@dkotter](https://github.com/dkotter), [@Sidsector9](https://github.com/Sidsector9) via [#544](https://github.com/10up/classifai/pull/544)).
29+
- Update our title generation prompt to use a `system` message (props [@dkotter](https://github.com/dkotter), [@Sidsector9](https://github.com/Sidsector9) via [#545](https://github.com/10up/classifai/pull/545)).
30+
- Better error handling for environments that don't match our minimum PHP version (props [@rahulsprajapati](https://github.com/rahulsprajapati), [@dkotter](https://github.com/dkotter) via [#546](https://github.com/10up/classifai/pull/546)).
31+
- Modify the audio generation process for the TTS feature. Audio generation is enabled by default but will be disabled automatically once audio has been generated (props [@joshuaabenazer](https://github.com/joshuaabenazer), [@dkotter](https://github.com/dkotter) via [#549](https://github.com/10up/classifai/pull/549)).
32+
- Upgrade the Plugin Update Checker library to from 4.13 to 5.1 (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#555](https://github.com/10up/classifai/pull/555)).
33+
- Update the references of the renamed Computer Vision API to Azure AI Vision (props [@kmgalanakis](https://github.com/kmgalanakis), [@dkotter](https://github.com/dkotter) via [#560](https://github.com/10up/classifai/pull/560)).
34+
- Update the Release GitHub Action workflow files to fix an issue where release archives were not being attached (props [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#565](https://github.com/10up/classifai/pull/565)).
35+
36+
### Fixed
37+
- Ensure we define a class property before using it to avoid PHP deprecation notices (props [@dkotter](https://github.com/dkotter), [@ankitguptaindia](https://github.com/ankitguptaindia), [@Sidsector9](https://github.com/Sidsector9) via [#548](https://github.com/10up/classifai/pull/548)).
38+
- Prevent Text-to-Speech audio markup leakage into places using excerpts (like archives) (props [@joshuaabenazer](https://github.com/joshuaabenazer), [@dkotter](https://github.com/dkotter) via [#558](https://github.com/10up/classifai/pull/558)).
39+
- Make sure our E2E tests work properly on WordPress 6.3 (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh) via [#562](https://github.com/10up/classifai/pull/562)).
40+
- Add a longer delay around image generation in the Media Inserter (props [@Sidsector9](https://github.com/joshuaabenazer), [@dkotter](https://github.com/dkotter) via [#569](https://github.com/10up/classifai/pull/569)).
41+
42+
### Security
43+
- Bump `word-wrap` from 1.2.3 to 1.2.4 (props [@dependabot[bot]](https://github.com/apps/dependabot) via [#542](https://github.com/10up/classifai/pull/542)).
44+
- Bump `tough-cookie` from 2.5.0 to 4.1.3 and `@cypress/request` from 2.88.11 to 2.88.12 (props [@dependabot[bot]](https://github.com/apps/dependabot) via [#563](https://github.com/10up/classifai/pull/563)).
45+
746
## [2.2.3] - 2023-07-13
847
### Added
948
- Support post classification via OpenAI Embeddings in the Classic Editor (props [@phpbits](https://github.com/phpbits), [@dkotter](https://github.com/dkotter) via [#515](https://github.com/10up/classifai/pull/515)).
@@ -389,6 +428,7 @@ All notable changes to this project will be documented in this file, per [the Ke
389428
- Initial closed source release
390429

391430
[Unreleased]: https://github.com/10up/classifai/compare/trunk...develop
431+
[2.3.0]: https://github.com/10up/classifai/compare/2.2.3...2.3.0
392432
[2.2.3]: https://github.com/10up/classifai/compare/2.2.2...2.2.3
393433
[2.2.2]: https://github.com/10up/classifai/compare/2.2.1...2.2.2
394434
[2.2.1]: https://github.com/10up/classifai/compare/2.2.0...2.2.1

0 commit comments

Comments
 (0)