|
69 | 69 | echo "(${{ env.APPLY_FIXES_EVENT }} == 'all' || ${{ env.APPLY_FIXES_EVENT }} == ${{ github.event_name }}) && ${{ env.APPLY_FIXES_MODE }} == 'pull_request' && (${{ github.event_name }} == 'push' || ${{ github.event.pull_request.head.repo.full_name }} == ${{ github.repository }})" |
70 | 70 | - name: Create Pull Request with applied fixes |
71 | 71 | id: cpr |
72 | | - if: (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) |
| 72 | + if: (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' |
| 73 | + && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) |
73 | 74 | uses: peter-evans/create-pull-request@v7 |
74 | 75 | with: |
75 | 76 | token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} |
@@ -97,10 +98,14 @@ jobs: |
97 | 98 | # Print the condition |
98 | 99 | echo "${{ steps.ml.outputs.has_updated_sources }} == 1 && (${{ env.APPLY_FIXES_EVENT }} == 'all' || ${{ env.APPLY_FIXES_EVENT }} == ${{ github.event_name }}) && ${{ env.APPLY_FIXES_MODE }} == 'commit' && ${{ github.ref }} != 'refs/heads/master' && (${{ github.event_name }} == 'push' || ${{ github.event.pull_request.head.repo.full_name }} == ${{ github.repository }})" |
99 | 100 | - name: Prepare commit |
100 | | - if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/master' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) |
| 101 | + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) |
| 102 | + && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/master' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name |
| 103 | + == github.repository) |
101 | 104 | run: sudo chown -Rc $UID .git/ |
102 | 105 | - name: Commit and push applied linter fixes |
103 | | - if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/master' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) |
| 106 | + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) |
| 107 | + && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/master' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name |
| 108 | + == github.repository) |
104 | 109 | uses: stefanzweifel/git-auto-commit-action@v5 |
105 | 110 | with: |
106 | 111 | branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }} |
|
0 commit comments