Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
95480b6
Add WooCommerce-formatted changelog (PRO-181)
pattonwebz Jun 30, 2025
0fe242c
Initial plan
Copilot Oct 3, 2025
0ad06d6
Initial plan for fixing new window warning tooltip translation issue
Copilot Oct 3, 2025
218e265
Remove maxWidth and whiteSpace constraints from new window warning to…
Copilot Oct 3, 2025
6f948be
Add comprehensive Jest tests for new window warning tooltip
Copilot Oct 3, 2025
4215cb4
Make highlighter controls translatable
SteveJonesDev Oct 22, 2025
69f62a1
Merge pull request #1267 from equalizedigital/release/1.34.0
pattonwebz Oct 27, 2025
dee0856
New Window Tooltip bring back max-width but set whitespace to normal
pattonwebz Nov 11, 2025
e6c96a8
Adjust NewWindowWarning tests, can't actually verify line breaks
pattonwebz Nov 11, 2025
3d939b4
Merge pull request #1249 from equalizedigital/copilot/fix-f14cb420-10…
pattonwebz Nov 11, 2025
1bbd952
Initial plan
Copilot Nov 18, 2025
db1f522
Add versions 1.27.0, 1.27.1, 1.28.0 to woo-changelog.txt and fix revi…
Copilot Nov 18, 2025
f909d66
Add versions 1.29.0-1.34.0 to woo-changelog.txt
Copilot Nov 18, 2025
588d4b7
Merge pull request #1273 from equalizedigital/copilot/sub-pr-1045
pattonwebz Nov 18, 2025
11a9205
Merge remote-tracking branch 'origin/develop' into william/pro-181-ad…
pattonwebz Nov 19, 2025
76aa088
Remake the composer and package lock file with latest updates
pattonwebz Nov 19, 2025
e2db4b9
Add dates to the woo-changelog entries
pattonwebz Nov 19, 2025
da563c7
Update the date formats to match what woocommerse expects
pattonwebz Nov 19, 2025
d5799c2
Move the contents from woo-changelog.txt to be the main changelog.txt
pattonwebz Nov 19, 2025
9c8adec
Updated the format of the changelogs in readme to follow the new format
pattonwebz Nov 19, 2025
cf4ad43
fix: improve summary message construction by conditionally adding par…
SteveJonesDev Nov 19, 2025
6caf025
feat: make tooltip and button labels translatable using localization …
SteveJonesDev Nov 19, 2025
409b8e7
Add the plugin header to the changelog
pattonwebz Nov 19, 2025
0a9408a
fix: streamline summary message construction for accessibility issues
SteveJonesDev Nov 19, 2025
68d3abc
Merge pull request #1261 from equalizedigital/codex/make-frontend-hig…
SteveJonesDev Nov 19, 2025
0b3873d
Fix a linting issue
pattonwebz Nov 20, 2025
13d67f2
Add a validator script for new changelog format
pattonwebz Nov 20, 2025
aaa3965
Use date functions that are usable across systems
pattonwebz Nov 20, 2025
1dbdb52
Get the lock files directly from develop
pattonwebz Nov 20, 2025
fa6a966
Merge remote-tracking branch 'origin/william/pro-181-add-a-woocommerc…
pattonwebz Nov 20, 2025
3c8d9de
Merge pull request #1045 from equalizedigital/william/pro-181-add-a-w…
pattonwebz Nov 21, 2025
25e74c8
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
545fdc5
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
8f10a13
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
86668d2
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
9e4a0cd
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
3021fb9
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
f79fa0a
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
e883b92
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
abb6a98
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
71fc0cf
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
e4d1a6c
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
9ecb4d2
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
d613eb9
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
2b4c171
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
36be21c
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
f26c49e
PTC accessibility-checker (1985): Automatic Translations November 21,…
SteveJonesDev Nov 21, 2025
182b6fe
Merge pull request #1276 from equalizedigital/ptc_1985_automatic_tran…
pattonwebz Nov 21, 2025
7e60ed2
Updated: prevent initial scan on unsaved posts; fallback for classic…
SteveJonesDev Nov 25, 2025
ddaba48
Updated: simplified prevent initial scan
SteveJonesDev Nov 25, 2025
9dd6119
Updated: Use WordPress date functions instead of server time for igno…
SteveJonesDev Nov 25, 2025
fbd5443
Refactor: Replace server time with WordPress time for ignore date han…
SteveJonesDev Nov 25, 2025
a05e4d4
Refactor: Update datetime functions to use type hints and improve cla…
SteveJonesDev Nov 25, 2025
1e86ba8
Fix: Update ignore date handling to use WordPress time functions inst…
SteveJonesDev Nov 25, 2025
840475d
docs: regenerate hooks docs
github-actions[bot] Nov 25, 2025
2546110
Update: help ID for new window warning fix settings
SteveJonesDev Nov 25, 2025
183795a
Merge pull request #1283 from equalizedigital/steve/pro-301-update-do…
SteveJonesDev Nov 25, 2025
fade52c
Merge pull request #1282 from equalizedigital/automation/regenerate-h…
SteveJonesDev Nov 25, 2025
6ed7220
docs: regenerate hooks docs
github-actions[bot] Nov 25, 2025
87b02e2
Merge pull request #1284 from equalizedigital/automation/regenerate-h…
SteveJonesDev Nov 25, 2025
a9012b9
chore: update workflow trigger to only run on release branches
SteveJonesDev Nov 25, 2025
23fe88c
Merge pull request #1279 from equalizedigital/steve/pro-164-ignor-tim…
SteveJonesDev Nov 26, 2025
8a34468
:safety_vest: When sanitizing option checkboxes allow int 1 and string 1
pattonwebz Nov 28, 2025
4e26656
:label: Fix docblock param type to show both int and string are possible
pattonwebz Nov 28, 2025
d8fb6b6
:white_check_mark: Add test for the updated option checkbox sanitizer
pattonwebz Nov 28, 2025
f189db7
:rotating_light: fix lint issue with test file array syntax
pattonwebz Nov 28, 2025
f2dd3d7
:bug: Ignored issues shouldn't count for density average on welcome page
pattonwebz Nov 28, 2025
fc3e44a
Removed: fallback comment for classic editor in init function
SteveJonesDev Dec 1, 2025
3117013
Updated: include post status in scan data and prevent initial scan on…
SteveJonesDev Dec 1, 2025
ed4e30a
Merge pull request #1278 from equalizedigital/steve/pro-221-bug-scann…
SteveJonesDev Dec 2, 2025
f8a855a
Enhanced: dashboard widget to conditionally display upcoming meetups …
SteveJonesDev Dec 2, 2025
85b666e
Refactor: simplify upcoming meetups JSON handling by using null coale…
SteveJonesDev Dec 2, 2025
5bbfcb1
Fix: ensure upcoming meetup time is safely converted to string for HT…
SteveJonesDev Dec 2, 2025
7c0c6a6
Merge pull request #1286 from equalizedigital/william/pro-250-average…
pattonwebz Dec 2, 2025
33e3c13
Merge pull request #1285 from equalizedigital/william/pro-304-you-hav…
pattonwebz Dec 2, 2025
eee8c0c
Fixed: ignored issue count comparison and update ignored issues messa…
SteveJonesDev Dec 2, 2025
7b0f907
Add an action in the admin class to handle the ref filtering and const
pattonwebz Dec 2, 2025
289c05e
Add a const to the plugin that can hold a ref string for the links
pattonwebz Dec 2, 2025
8d476fc
Add a script that can update the ref const when needed for custom builds
pattonwebz Dec 2, 2025
3e0d758
Add a workflow capable of building a ref updating dist zip
pattonwebz Dec 2, 2025
9cb04ca
Action callbacks need to be public, not private
pattonwebz Dec 2, 2025
a468880
Handle the branch we should run on differently
pattonwebz Dec 2, 2025
c48ed70
Update some tests to account for WP6.9 changes to wp_json_encode flags.
pattonwebz Dec 2, 2025
db28a49
Fix some comment capitalization
pattonwebz Dec 3, 2025
4a59a02
Merge pull request #1293 from equalizedigital/william/pro-458-update-…
pattonwebz Dec 3, 2025
ce580e4
Removed: function_exists( 'wp_remote_post' ) check
SteveJonesDev Dec 3, 2025
a00b442
Removed: unnecessary escape
SteveJonesDev Dec 3, 2025
3b7207f
Fix: update phpcs ignore comments to clarify escaping rationale for d…
SteveJonesDev Dec 3, 2025
99a7ff3
Merge branch 'develop' into steve/pro-274-meetup-api-calls-sometimes-…
SteveJonesDev Dec 3, 2025
cdb4a9b
Fix: sanitize meetup name to prevent injection in upcoming meetups JS…
SteveJonesDev Dec 3, 2025
81b7826
Merge pull request #1288 from equalizedigital/steve/pro-274-meetup-ap…
SteveJonesDev Dec 3, 2025
925cc06
Trigger the build on release now as well
pattonwebz Dec 3, 2025
88b54e7
Update the build plugin workflow to handle production of 2 different …
pattonwebz Dec 3, 2025
f658a5b
Merge remote-tracking branch 'origin/develop' into william/pro-413-au…
pattonwebz Dec 3, 2025
e77bd72
Merge pull request #1290 from equalizedigital/steve/pro-235-front-end…
SteveJonesDev Dec 3, 2025
98edf1c
Update the build-plugin-with-ref.yml workflow to handle release, PR a…
pattonwebz Dec 3, 2025
beb313f
Comment on the PR with the build if one is made then remove the label
pattonwebz Dec 3, 2025
71c9e2b
When manually run to build plugin only build one copy - either with o…
pattonwebz Dec 3, 2025
04dbbe7
When building the latest zip file for a PR add the latest commit hash…
pattonwebz Dec 3, 2025
44a3a35
Use a static to store the validated table name across a request
pattonwebz Dec 4, 2025
8ed846a
Use the edac_get_valid_table_name helper when checking if database ta…
pattonwebz Dec 4, 2025
1f46366
Go back to old method of checking table for the update_database routine
pattonwebz Dec 4, 2025
ec78126
Update an action to a filter
pattonwebz Dec 4, 2025
e104460
Merge pull request #1292 from equalizedigital/william/pro-413-automat…
pattonwebz Dec 4, 2025
94015b2
Merge pull request #1296 from equalizedigital/william/pro-460-perform…
pattonwebz Dec 4, 2025
2e8ebb0
Bump version * Version: 1.34.0 -> 1.35.0
pattonwebz Dec 4, 2025
db452e4
docs: regenerate hooks docs
github-actions[bot] Dec 4, 2025
be9a74b
Merge pull request #1297 from equalizedigital/automation/regenerate-h…
pattonwebz Dec 4, 2025
a105578
Add changelog for 1.35.0
pattonwebz Dec 4, 2025
99471db
Merge remote-tracking branch 'origin/release/1.35.0' into release/1.35.0
pattonwebz Dec 4, 2025
7221a57
Put 1.35.0 changelog into the readme as well
pattonwebz Dec 4, 2025
6f115a3
Update pot file with latest strings
pattonwebz Dec 4, 2025
76a0b43
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
983f2be
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
6d1b294
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
fa569d1
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
0d98936
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
dc2bf10
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
8f50c33
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
b6f7f77
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
ee12c35
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
26e7c9b
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
95bdcab
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
10ad54f
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
35fe965
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
c7372b6
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
a1ab7b8
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
668b334
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
b0c4bfa
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
bd06e41
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
fbfbbdc
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
b1a1ff0
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
bd99ff8
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
b82a7e6
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
6599c00
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
e3ba344
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
d4ac44a
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
999b59e
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
7493770
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
0ecc6ce
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
d254f9d
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
7d1bf3e
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
fc50113
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
64fedf5
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
34b3518
PTC accessibility-checker (1985): Automatic Translations December 04,…
SteveJonesDev Dec 4, 2025
475bd3e
Merge pull request #1299 from equalizedigital/ptc_1985_automatic_tran…
pattonwebz Dec 4, 2025
0656231
Merge remote-tracking branch 'origin/develop' into release/1.35.0
pattonwebz Dec 4, 2025
dfc911b
Merge branch 'main' into release/1.35.0
pattonwebz Dec 4, 2025
84f4b9f
Add a dist:keep-build-folder npm run script to match other plugins
pattonwebz Dec 5, 2025
547b317
When making primary or ref builds unzip them to folders for artefact …
pattonwebz Dec 5, 2025
d9ffb82
Give the folder names to the artefact uploading for priamry and ref b…
pattonwebz Dec 5, 2025
4efb549
Merge remote-tracking branch 'origin/release/1.35.0' into release/1.35.0
pattonwebz Dec 5, 2025
60ccd74
Cache the node_modules directory for the workflow with key of the pac…
pattonwebz Dec 5, 2025
c9e0dfe
Skip the install step if we already have cached node_modules
pattonwebz Dec 5, 2025
22e781e
Add support for label to build both primary and ref from PR
pattonwebz Dec 5, 2025
550da56
Get the version properly and update the artefact names for builds
pattonwebz Dec 5, 2025
4422986
Avoid double .zip name on the artefact
pattonwebz Dec 5, 2025
10430a6
Link direct to the artefact rather than just to the logs
pattonwebz Dec 5, 2025
b38c84b
Link direct to the artefact rather than just to the logs
pattonwebz Dec 5, 2025
49562b3
Bump tested up to to 6.9
pattonwebz Dec 5, 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
329 changes: 329 additions & 0 deletions .github/workflows/build-plugin-with-ref.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,329 @@
name: Build Accessibility Checker Plugin with Ref Param

on:
workflow_dispatch:
inputs:
ref_param:
description: "Ref param string to set in EDAC_REF_PARAM (optional)"
required: false
type: string
pull_request:
types: [labeled]
release:
types: [created, published]

permissions:
contents: write
pull-requests: write

jobs:
build-plugin:
name: Build plugin zip
runs-on: ubuntu-latest
# Run on release, manual, or PR when a specific label is added
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'gha-build') || contains(github.event.pull_request.labels.*.name, 'gha-build-all')))

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Determine mode and ref param for this run
id: setref
run: |
MODE="${{ github.event_name }}"
echo "mode=$MODE" >> $GITHUB_OUTPUT
# Manual run: take input if provided; else empty
if [ "$MODE" = "workflow_dispatch" ]; then
REF_INPUT="${{ github.event.inputs.ref_param }}"
echo "ref_param=${REF_INPUT}" >> $GITHUB_OUTPUT
# For manual mode: if ref is provided, skip primary build
if [ -n "$REF_INPUT" ]; then
echo "skip_primary=true" >> $GITHUB_OUTPUT
else
echo "skip_primary=false" >> $GITHUB_OUTPUT
fi
# Release: use fixed ref 'woocommerce'
elif [ "$MODE" = "release" ]; then
echo "ref_param=woocommerce" >> $GITHUB_OUTPUT
echo "skip_primary=false" >> $GITHUB_OUTPUT
# PR labeled: check which label
else
# Check if gha-build-all label is present (build both)
if echo "${{ github.event.pull_request.labels.*.name }}" | grep -q "gha-build-all"; then
echo "ref_param=woocommerce" >> $GITHUB_OUTPUT
echo "skip_primary=false" >> $GITHUB_OUTPUT
else
# gha-build label (build primary only)
echo "ref_param=" >> $GITHUB_OUTPUT
echo "skip_primary=false" >> $GITHUB_OUTPUT
fi
fi

- name: Show selected mode/ref
run: |
echo "Triggered on: $GITHUB_EVENT_NAME"
echo "Mode: ${{ steps.setref.outputs.mode }}"
echo "Head ref: ${{ github.head_ref }}"
echo "PR number: ${{ github.event.pull_request.number }}"
echo "Release tag: ${{ github.event.release.tag_name }}"
echo "Ref param: ${{ steps.setref.outputs.ref_param }}"

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: node-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
node-${{ runner.os }}-

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer
coverage: none

- name: Install Composer dependencies
run: |
if [ -f composer.json ]; then composer install --no-dev --prefer-dist --no-progress --no-interaction; else echo "No composer.json"; fi

- name: Install npm dependencies
run: |
if [ -f package.json ]; then
if [ -d node_modules ]; then
echo "node_modules cache hit, skipping install"
else
npm ci --prefer-offline --no-audit
fi
else
echo "No package.json"
fi

- name: Extract plugin version and commit hash
id: version
run: |
VERSION=$(grep "Version:" accessibility-checker.php | head -1 | sed 's/.*Version:[[:space:]]*\([^ ]*\).*/\1/')
SHORT_SHA=$(git rev-parse --short HEAD)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
echo "Plugin version: $VERSION"
echo "Short commit hash: $SHORT_SHA"

- name: Verify EDAC_REF_PARAM is empty before first build
if: steps.setref.outputs.skip_primary != 'true'
run: |
grep -n "define( 'EDAC_REF_PARAM', '' )" accessibility-checker.php || { echo "EDAC_REF_PARAM should be empty for first build"; exit 1; }

- name: Build primary dist zip (empty ref)
if: steps.setref.outputs.skip_primary != 'true'
run: |
echo "Building primary zip with empty ref..."
npm run dist
ZIP_PATH=$(ls -1 dist/*.zip build/*.zip 2>/dev/null | head -n 1 || true)
if [ -z "$ZIP_PATH" ]; then
ZIP_PATH=$(ls -1 *.zip 2>/dev/null | head -n 1 || true)
fi
if [ -z "$ZIP_PATH" ]; then
echo "Error: Could not locate produced zip after npm run dist" >&2
exit 1
fi
mkdir -p builds

# Construct the new filename based on trigger mode
VERSION="${{ steps.version.outputs.version }}"
SHORT_SHA="${{ steps.version.outputs.short_sha }}"

if [ "${{ github.event_name }}" = "pull_request" ]; then
# PR: accessibility-checker-{version}-{prnumber}-{hash}.zip
PRIMARY_ZIP_NAME="accessibility-checker-${VERSION}-${{ github.event.pull_request.number }}-${SHORT_SHA}.zip"
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
# Manual: accessibility-checker-{version}-{hash}.zip
PRIMARY_ZIP_NAME="accessibility-checker-${VERSION}-${SHORT_SHA}.zip"
elif [ "${{ github.event_name }}" = "release" ]; then
# Release: accessibility-checker-{version}.zip
PRIMARY_ZIP_NAME="accessibility-checker-${VERSION}.zip"
else
# Fallback
PRIMARY_ZIP_NAME="accessibility-checker-${VERSION}-${SHORT_SHA}.zip"
fi

mv "$ZIP_PATH" "builds/$PRIMARY_ZIP_NAME"
PRIMARY_ZIP_BASENAME="${PRIMARY_ZIP_NAME%.zip}"
unzip -q "builds/$PRIMARY_ZIP_NAME" -d "builds/$PRIMARY_ZIP_BASENAME"
PRIMARY_ZIP_FOLDER="builds/$PRIMARY_ZIP_BASENAME"
PRIMARY_ZIP_NAME_NO_EXT="${PRIMARY_ZIP_NAME%.zip}"
echo "PRIMARY_ZIP_PATH=builds/$PRIMARY_ZIP_NAME" >> $GITHUB_ENV
echo "PRIMARY_ZIP_NAME=$PRIMARY_ZIP_NAME" >> $GITHUB_ENV
echo "PRIMARY_ZIP_NAME_NO_EXT=$PRIMARY_ZIP_NAME_NO_EXT" >> $GITHUB_ENV
echo "PRIMARY_ZIP_FOLDER=$PRIMARY_ZIP_FOLDER" >> $GITHUB_ENV
echo "Produced primary zip: builds/$PRIMARY_ZIP_NAME"
echo "Produced primary folder: $PRIMARY_ZIP_FOLDER"

- name: Upload primary build artifact
if: steps.setref.outputs.skip_primary != 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRIMARY_ZIP_NAME_NO_EXT }}
path: ${{ env.PRIMARY_ZIP_FOLDER }}
if-no-files-found: error

- name: Check if ref build is needed
id: check_ref
run: |
MODE="${{ steps.setref.outputs.mode }}"
REF_VALUE="${{ steps.setref.outputs.ref_param }}"
# For manual: build ref if ref is provided
# For release: always build ref (woocommerce)
# For PR: never build ref
if [ "$MODE" = "workflow_dispatch" ] && [ -n "$REF_VALUE" ]; then
echo "need_ref_build=true" >> $GITHUB_OUTPUT
echo "Ref build needed with value: $REF_VALUE"
elif [ "$MODE" = "release" ] && [ -n "$REF_VALUE" ]; then
echo "need_ref_build=true" >> $GITHUB_OUTPUT
echo "Ref build needed with value: $REF_VALUE"
else
echo "need_ref_build=false" >> $GITHUB_OUTPUT
echo "No ref build needed (mode=$MODE, ref='$REF_VALUE')"
fi

- name: Update EDAC_REF_PARAM for second build
if: steps.check_ref.outputs.need_ref_build == 'true'
run: |
chmod +x ./scripts/update-ref-param.sh
./scripts/update-ref-param.sh "${{ steps.setref.outputs.ref_param }}"

- name: Verify EDAC_REF_PARAM change
if: steps.check_ref.outputs.need_ref_build == 'true'
run: |
grep -n "EDAC_REF_PARAM" accessibility-checker.php || { echo "EDAC_REF_PARAM not found"; exit 1; }
echo "Updated EDAC_REF_PARAM contents:"
grep "EDAC_REF_PARAM" accessibility-checker.php

- name: Build ref dist zip (custom ref)
if: steps.check_ref.outputs.need_ref_build == 'true'
run: |
echo "Building ref zip with custom ref value..."
npm run dist
ZIP_PATH=$(ls -1 dist/*.zip build/*.zip 2>/dev/null | head -n 1 || true)
if [ -z "$ZIP_PATH" ]; then
ZIP_PATH=$(ls -1 *.zip 2>/dev/null | head -n 1 || true)
fi
if [ -z "$ZIP_PATH" ]; then
echo "Error: Could not locate produced zip after npm run dist" >&2
exit 1
fi
mkdir -p builds

VERSION="${{ steps.version.outputs.version }}"
SHORT_SHA="${{ steps.version.outputs.short_sha }}"
REF_VALUE="${{ steps.setref.outputs.ref_param }}"

# Ref build naming: accessibility-checker-{version}-ref-{refvalue}-{hash}.zip
REF_ZIP_NAME="accessibility-checker-${VERSION}-ref-${REF_VALUE}-${SHORT_SHA}.zip"

mv "$ZIP_PATH" "builds/$REF_ZIP_NAME"
REF_ZIP_BASENAME="${REF_ZIP_NAME%.zip}"
unzip -q "builds/$REF_ZIP_NAME" -d "builds/$REF_ZIP_BASENAME"
REF_ZIP_FOLDER="builds/$REF_ZIP_BASENAME"
REF_ZIP_NAME_NO_EXT="${REF_ZIP_NAME%.zip}"
echo "REF_ZIP_PATH=builds/$REF_ZIP_NAME" >> $GITHUB_ENV
echo "REF_ZIP_NAME=$REF_ZIP_NAME" >> $GITHUB_ENV
echo "REF_ZIP_NAME_NO_EXT=$REF_ZIP_NAME_NO_EXT" >> $GITHUB_ENV
echo "REF_ZIP_FOLDER=$REF_ZIP_FOLDER" >> $GITHUB_ENV
echo "Produced ref zip: builds/$REF_ZIP_NAME"
echo "Produced ref folder: $REF_ZIP_FOLDER"

- name: Upload ref build artifact
if: steps.check_ref.outputs.need_ref_build == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ env.REF_ZIP_NAME_NO_EXT }}
path: ${{ env.REF_ZIP_FOLDER }}
if-no-files-found: error

- name: Upload to release (both zips)
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: |
${{ env.PRIMARY_ZIP_PATH }}
${{ steps.check_ref.outputs.need_ref_build == 'true' && env.REF_ZIP_PATH || '' }}
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Comment on PR with primary build details
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const runId = context.runId;
const runUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`;
const primaryName = process.env.PRIMARY_ZIP_NAME_NO_EXT;

// Get the artifact ID for the download URL
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runId,
});

const artifact = artifacts.data.artifacts.find(a => a.name === primaryName);
const downloadUrl = artifact
? `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}/artifacts/${artifact.id}`
: runUrl;

const body = `✅ Accessibility Checker build (primary only)\n\n- **Artifact**: [Download ${primaryName}.zip](${downloadUrl})\n- **Workflow run**: [View logs](${runUrl})`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body,
});

- name: Remove triggering label from PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const labels = context.payload.pull_request.labels.map(l => l.name);
const labelToRemove = labels.includes('gha-build-all') ? 'gha-build-all' : 'gha-build';
try {
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
name: labelToRemove,
});
console.log(`Removed label '${labelToRemove}' from PR #${prNumber}`);
} catch (e) {
console.log(`Could not remove label '${labelToRemove}' from PR #${prNumber}: ${e.message}`);
}

- name: Summary
run: |
echo "=== Build Summary ==="
echo "Mode: ${{ steps.setref.outputs.mode }}"
echo "Primary zip (empty ref): ${{ env.PRIMARY_ZIP_PATH }}"
if [ "${{ steps.check_ref.outputs.need_ref_build }}" = "true" ]; then
echo "Ref zip (ref=${{ steps.setref.outputs.ref_param }}): ${{ env.REF_ZIP_PATH }}"
else
echo "Ref zip: Not built"
fi
if [ "${{ github.event_name }}" = "release" ]; then
echo "Uploaded to release: ${{ github.event.release.html_url }}"
fi
5 changes: 1 addition & 4 deletions .github/workflows/verify-hooks-docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Verify hooks docs

on:
pull_request:
paths:
- '**.php'
push:
branches:
- develop
- 'release/**'

jobs:
verify-docs:
Expand Down
9 changes: 7 additions & 2 deletions accessibility-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: Accessibility Checker
* Plugin URI: https://a11ychecker.com
* Description: Audit and check your website for accessibility before you hit publish. In-post accessibility scanner and guidance.
* Version: 1.34.0
* Version: 1.35.0
* Requires PHP: 7.4
* Author: Equalize Digital
* Author URI: https://equalizedigital.com
Expand All @@ -36,7 +36,7 @@

// Current plugin version.
if ( ! defined( 'EDAC_VERSION' ) ) {
define( 'EDAC_VERSION', '1.34.0' );
define( 'EDAC_VERSION', '1.35.0' );
}

// Current database version.
Expand Down Expand Up @@ -72,6 +72,11 @@
define( 'EDAC_DEBUG', false );
}

// Default ref is empty - we don't ref links, but it can be filtered by providers.
if ( ! defined( 'EDAC_REF_PARAM' ) ) {
define( 'EDAC_REF_PARAM', '' );
}

// SVG Icons.
define( 'EDAC_SVG_IGNORE_ICON', file_get_contents( __DIR__ . '/assets/images/ignore-icon.svg' ) );

Expand Down
Loading
Loading