Fix stored XSS vulnerability via do=export_metadata #4305
[dokuwiki.git] / .github / workflows / autoFix.yml
blob36d3649e5ec84f1179c8c84c2c70b6e9c97757dc
1 name: "Auto-Fix code"
2 on:
3   push:
4     branches:
5       - master
7 jobs:
8   autofix:
9     if: github.repository_owner == 'dokuwiki'
10     runs-on: ubuntu-latest
11     steps:
12       - name: Checkout
13         uses: actions/checkout@v4
14         with:
15           fetch-depth: 0
17       - name: Setup PHP
18         uses: shivammathur/setup-php@v2
19         with:
20           php-version: '8.2'
22       - name: Install tools
23         run: |
24           cd _test
25           composer install --no-interaction --no-progress --no-suggest --prefer-dist
27       - name: Setup Cache
28         uses: actions/cache@v3
29         with:
30           path: _test/.rector-cache
31           key: ${{ runner.os }}-rector-${{ hashFiles('_test/rector.php') }}
33       - name: Run Rector
34         run: ./_test/vendor/bin/rector process --config _test/rector.php --no-diffs
36       - name: Run PHP CodeSniffer autofixing
37         continue-on-error: true # even if not all errors are fixed, we want to create a PR
38         run: ./_test/vendor/bin/phpcbf --standard=_test/phpcs_MigrationAdjustments.xml
40       - name: Create Pull Request
41         uses: peter-evans/create-pull-request@v6
42         with:
43           commit-message: "🤖 Rector and PHPCS fixes"
44           title: "🤖 Automatic code style fixes"
45           body: |
46             These changes were made automatically by running rector and phpcbf.
48             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.
50             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.
51           delete-branch: true
52           branch: "bot/autofix"