Skip to content

fix(checkout): generate friendly usernames from first.last name #1116

fix(checkout): generate friendly usernames from first.last name

fix(checkout): generate friendly usernames from first.last name #1116

Workflow file for this run

name: Code Quality
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
code-quality:
name: Code Quality Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
with:
php-version: '8.2'
extensions: mysqli, gd, bcmath
tools: composer
- name: Install PHP Dependencies
run: composer install --no-interaction --prefer-dist
- name: Get changed PHP files
id: changed-files
uses: tj-actions/changed-files@2d756ea4c53f7f6b397767d8723b3a10a9f35bf2 # v44
with:
files: |
**/*.php
- name: Run PHP CodeSniffer
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
vendor/bin/phpcs --report=checkstyle --report-file=phpcs-report.xml ${{ steps.changed-files.outputs.all_changed_files }} || true
[ -s phpcs-report.xml ] || echo '<?xml version="1.0" encoding="UTF-8"?><checkstyle></checkstyle>' > phpcs-report.xml
- name: Run PHPStan
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo "Running PHPStan on changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
vendor/bin/phpstan analyse --error-format=checkstyle --no-progress ${{ steps.changed-files.outputs.all_changed_files }} > phpstan-report.xml || true
[ -s phpstan-report.xml ] || echo '<?xml version="1.0" encoding="UTF-8"?><checkstyle></checkstyle>' > phpstan-report.xml
- name: Annotate PR with PHPCS results
uses: staabm/annotate-pull-request-from-checkstyle-action@a7dbcfcab1a6892dae7893a160cc87f23af94de4 # v1
if: github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true'
with:
files: phpcs-report.xml
graceful-warnings: true
errors-as-warnings: true
- name: Annotate PR with PHPStan results
uses: staabm/annotate-pull-request-from-checkstyle-action@a7dbcfcab1a6892dae7893a160cc87f23af94de4 # v1
if: github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true'
with:
files: phpstan-report.xml
graceful-warnings: true
errors-as-warnings: true