1077b7fe2SAndreas Gohrname: "Auto-Fix code" 2077b7fe2SAndreas Gohron: 3077b7fe2SAndreas Gohr push: 4077b7fe2SAndreas Gohr branches: 5d6784168SAndreas Gohr - master 6077b7fe2SAndreas Gohr 7077b7fe2SAndreas Gohrjobs: 8077b7fe2SAndreas Gohr autofix: 9077b7fe2SAndreas Gohr runs-on: ubuntu-latest 10077b7fe2SAndreas Gohr steps: 11077b7fe2SAndreas Gohr - name: Checkout 12077b7fe2SAndreas Gohr uses: actions/checkout@v3 13077b7fe2SAndreas Gohr with: 14077b7fe2SAndreas Gohr fetch-depth: 0 15077b7fe2SAndreas Gohr 16077b7fe2SAndreas Gohr - name: Setup PHP 17077b7fe2SAndreas Gohr uses: shivammathur/setup-php@v2 18077b7fe2SAndreas Gohr with: 19077b7fe2SAndreas Gohr php-version: '8.2' 20077b7fe2SAndreas Gohr tools: phpcbf, rector 21077b7fe2SAndreas Gohr 22077b7fe2SAndreas Gohr - name: Setup Cache 23077b7fe2SAndreas Gohr uses: actions/cache@v3 24077b7fe2SAndreas Gohr with: 25077b7fe2SAndreas Gohr path: _test/.rector-cache 26077b7fe2SAndreas Gohr key: ${{ runner.os }}-rector-${{ hashFiles('_test/rector.php') }} 27077b7fe2SAndreas Gohr 28077b7fe2SAndreas Gohr - name: Run Rector 29077b7fe2SAndreas Gohr run: rector process --config _test/rector.php --no-diffs 30077b7fe2SAndreas Gohr 31077b7fe2SAndreas Gohr - name: Run PHP CodeSniffer autofixing 32*aae5a43eSAndreas Gohr continue-on-error: true # even if not all errors are fixed, we want to create a PR 33077b7fe2SAndreas Gohr run: phpcbf --standard=_test/phpcs_MigrationAdjustments.xml 34077b7fe2SAndreas Gohr 35077b7fe2SAndreas Gohr - name: Create Pull Request 36077b7fe2SAndreas Gohr uses: peter-evans/create-pull-request@v4 37077b7fe2SAndreas Gohr with: 38bf7ba4d5SAndreas Gohr commit-message: " Rector and PHPCS fixes" 39bf7ba4d5SAndreas Gohr title: " Automatic code style fixes" 40bf7ba4d5SAndreas Gohr body: | 41bf7ba4d5SAndreas Gohr These changes were made automatically by running rector and phpcbf. 42bf7ba4d5SAndreas Gohr 43*aae5a43eSAndreas Gohr Please carefully check the changes before merging. Please note that unit tests are not run for automated pull requests - so if in doubt, manually test the branch before merging. 44bf7ba4d5SAndreas Gohr 45*aae5a43eSAndreas Gohr If you disagree with the changes, simply clean the code yourself and create a new pull request. This PR automatically closes when no more changes are suggested by rector and phpcbf. 46077b7fe2SAndreas Gohr delete-branch: true 47077b7fe2SAndreas Gohr branch: "bot/autofix" 48