From cd9b21473bf4571cb54eaa08c85213a6c4d31bc4 Mon Sep 17 00:00:00 2001 From: Mark Heydon Date: Wed, 13 May 2026 16:30:34 +0100 Subject: [PATCH 1/6] Configure Dependabot for multiple package ecosystems Added support for GitHub Actions, Composer, and Docker package ecosystems with weekly update schedules and limits on open pull requests. --- .github/dependabot.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0b68dc3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,25 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/.github/workflows" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + labels: + - "dependencies" + + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + labels: + - "dependencies" + + - package-ecosystem: "docker" + directory: "/.devcontainer" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + labels: + - "dependencies" From 91d170bbdd22616d030ba2e91a0d118f1dcbd6e1 Mon Sep 17 00:00:00 2001 From: Mark Heydon Date: Wed, 13 May 2026 16:44:43 +0100 Subject: [PATCH 2/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0b68dc3..8162095 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,7 @@ version: 2 updates: - package-ecosystem: "github-actions" - directory: "/.github/workflows" + directory: "/" schedule: interval: "weekly" open-pull-requests-limit: 5 From 73ffa840d3ea73eff48b2ed846a4e449041b77f0 Mon Sep 17 00:00:00 2001 From: Mark Heydon Date: Wed, 13 May 2026 17:06:10 +0000 Subject: [PATCH 3/6] Modernised workflows a bit. --- .github/workflows/composer-diff.yml | 18 +++++++--- .github/workflows/phpcs.yml | 55 ++++++++++++++++++++++------- 2 files changed, 57 insertions(+), 16 deletions(-) diff --git a/.github/workflows/composer-diff.yml b/.github/workflows/composer-diff.yml index 8dc20e9..1312cdd 100644 --- a/.github/workflows/composer-diff.yml +++ b/.github/workflows/composer-diff.yml @@ -1,25 +1,35 @@ name: Composer Diff + on: pull_request: paths: - 'composer.lock' + +permissions: + contents: read + pull-requests: write + jobs: composer-diff: name: Composer Diff runs-on: ubuntu-latest + timeout-minutes: 5 + concurrency: + group: composer-diff-${{ github.event.pull_request.number }} + cancel-in-progress: true steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: fetch-depth: 0 # Required to make it possible to compare with PR base branch - name: Generate composer diff id: composer_diff # To reference the output in comment - uses: IonBazan/composer-diff-action@v1 + uses: IonBazan/composer-diff-action@v1.2 - - uses: marocchino/sticky-pull-request-comment@v2 + - uses: marocchino/sticky-pull-request-comment@v3 # An empty diff result will break this action. - if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }} + if: ${{ github.event.pull_request.head.repo.fork == false && steps.composer_diff.outputs.composer_diff_exit_code != '0' && steps.composer_diff.outputs.composer_diff != '' }} with: header: composer-diff # Creates a collapsed comment with the report message: | diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 2a0c369..08dc65a 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -1,19 +1,50 @@ +name: Inspections + on: pull_request -name: Inspections +permissions: + contents: read + jobs: runPHPCSInspection: name: Run PHPCS inspection runs-on: ubuntu-latest + timeout-minutes: 10 + concurrency: + group: phpcs-${{ github.event.pull_request.number }} + cancel-in-progress: true steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Run PHPCS inspection - uses: rtCamp/action-phpcs-code-review@v3 - env: - GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }} - SKIP_FOLDERS: "tests,.github" - PHPCS_SNIFFS_EXCLUDE: "WordPress.Files.FileName" - with: - args: "WordPress,WordPress-Core,WordPress-Docs" + - uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + tools: composer + coverage: none + + - name: Install dependencies + run: composer install --no-interaction --no-progress --prefer-dist --no-scripts + + - name: Install cs2pr + run: | + curl -fsSL -o cs2pr https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr-linux-amd64 + chmod +x cs2pr + + - name: Run PHPCS inspection + run: | + set +e + ./vendor/bin/phpcs \ + --standard=WordPress,WordPress-Core,WordPress-Docs \ + --ignore=tests/*,.github/* \ + --exclude=WordPress.Files.FileName \ + --report=checkstyle > phpcs-report.xml + phpcs_exit=$? + + if [[ -s phpcs-report.xml ]]; then + ./cs2pr < phpcs-report.xml || true + fi + + exit $phpcs_exit From 07685bee698a31d945b007578f4162ccabdf0684 Mon Sep 17 00:00:00 2001 From: Mark Heydon Date: Wed, 13 May 2026 17:12:02 +0000 Subject: [PATCH 4/6] Updated cs2pr path. --- .github/workflows/phpcs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 08dc65a..4f366d7 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -30,7 +30,7 @@ jobs: - name: Install cs2pr run: | - curl -fsSL -o cs2pr https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr-linux-amd64 + curl -fsSL -o cs2pr https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr chmod +x cs2pr - name: Run PHPCS inspection From 8d7087a02287b54027b778506f014e65749a41de Mon Sep 17 00:00:00 2001 From: Mark Heydon Date: Wed, 13 May 2026 17:31:40 +0000 Subject: [PATCH 5/6] PHPCS now gets an explicit target directory. --- .github/workflows/phpcs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 4f366d7..b14e5b3 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -40,7 +40,9 @@ jobs: --standard=WordPress,WordPress-Core,WordPress-Docs \ --ignore=tests/*,.github/* \ --exclude=WordPress.Files.FileName \ - --report=checkstyle > phpcs-report.xml + --report=checkstyle \ + --report-file=phpcs-report.xml \ + src phpcs_exit=$? if [[ -s phpcs-report.xml ]]; then From 192c0f11abdf3a392d2646a7b545def7f20cbd1e Mon Sep 17 00:00:00 2001 From: Mark Heydon Date: Wed, 13 May 2026 17:35:32 +0000 Subject: [PATCH 6/6] Normalize CSS line endings for PHPCS --- src/style.css | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/style.css b/src/style.css index 714db32..b6a3cc4 100644 --- a/src/style.css +++ b/src/style.css @@ -1,9 +1,9 @@ -/* -Theme Name: Avada Child -Description: Child theme for Avada theme. -Author: MHCG LTD -Author URI: https://www.mhcg.co.uk -Template: Avada -Version: 0.1.0 -Text Domain: Avada +/* +Theme Name: Avada Child +Description: Child theme for Avada theme. +Author: MHCG LTD +Author URI: https://www.mhcg.co.uk +Template: Avada +Version: 0.1.0 +Text Domain: Avada */ \ No newline at end of file