Skip to content

[jfdi] Add phpcbf before lint #2

[jfdi] Add phpcbf before lint

[jfdi] Add phpcbf before lint #2

Workflow file for this run

name: PHP Code Beautifier
on: [pull_request]
permissions:
contents: write
pull-requests: write
jobs:
phpcbf:
name: PHPCBF & Commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Composer dependencies and run PHPCBF
run: |
composer install
composer phpcbf
- uses: stefanzweifel/git-auto-commit-action@v5
id: git-auto-commit
with:
commit_message: "PHPCBF: Fix coding standards"
commit_options: '--no-verify'
branch: ${{ github.ref }}
commit_user_name: "Pantheon Robot"
commit_user_email: "[email protected]"
- name: Add PR Comment
if: steps.git-auto-commit.outputs.changes_detected == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
CURRENT_COMMIT=$(git rev-parse --short HEAD)
gh pr comment ${{ github.event.pull_request.number }} -b "Hi from your friendly robot! :robot: I fixed PHPCS issues with \`phpcbf\` on $CURRENT_COMMIT. Please review the changes."