@@ -119,59 +119,59 @@ jobs:
119
119
120
120
# you may need to "Allow GitHub Actions to create and approve pull requests"
121
121
# https://stackoverflow.com/questions/72376229/github-actions-is-not-permitted-to-create-or-approve-pull-requests-createpullre
122
- js-cs-fixer :
123
- if : github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/auto-fixed/')
124
- runs-on : ${{ matrix.os }}
125
-
126
- strategy :
127
- matrix :
128
- os : [ubuntu-latest]
129
-
130
- steps :
131
- - name : Checkout Code
132
- uses : actions/checkout@v4
133
-
134
- - name : Setup Bun
135
- uses : oven-sh/setup-bun@v1
136
-
137
- - name : Use cached node_modules
138
- uses : actions/cache@v4
139
- with :
140
- path : node_modules
141
- key : node-modules-${{ hashFiles('**/bun.lockb') }}
142
- restore-keys : |
143
- node-modules-
144
-
145
- - name : Install Dependencies
146
- run : bun install
147
-
148
- - name : Set Application Key
149
- run : bun buddy key:generate
150
-
151
- - name : Prepare Git User
152
- run : |
153
- git config --global user.name "github-actions[bot]"
154
- git config --global user.email "action@github.com"
155
- git checkout -B "${{ env.FIXER_BRANCH }}"
156
-
157
- - name : Apply auto-fixers
158
- run : bun lint:fix
159
-
160
- - name : Create Fixer PR
161
- run : |
162
- if [[ -z $(git status --porcelain) ]]; then
163
- echo "Nothing to fix... Exiting."
164
- exit 0
165
- fi
166
- OPEN_PRS=`curl --silent -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open"`
167
- OPEN_FIXER_PRS=`echo ${OPEN_PRS} | grep -o "\"ref\": \"${{ env.FIXER_BRANCH }}\"" | wc -l`
168
- git commit -am "${{ env.TITLE }}"
169
- git push origin "${{ env.FIXER_BRANCH }}" --force
170
- if [ ${OPEN_FIXER_PRS} -eq "0" ]; then
171
- curl -X POST \
172
- -H "Accept: application/vnd.github.v3+json" \
173
- -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
174
- "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls" \
175
- -d "{ \"head\":\"${{ env.FIXER_BRANCH }}\", \"base\":\"${{ env.SOURCE_BRANCH }}\", \"title\":\"${{ env.TITLE }}\", \"body\":\"${{ env.DESCRIPTION }}\n\nTriggered by #${{ env.PR_NUMBER }}\" }"
176
- fi
177
- exit 1
122
+ # js-cs-fixer:
123
+ # if: github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/auto-fixed/')
124
+ # runs-on: ${{ matrix.os }}
125
+
126
+ # strategy:
127
+ # matrix:
128
+ # os: [ubuntu-latest]
129
+
130
+ # steps:
131
+ # - name: Checkout Code
132
+ # uses: actions/checkout@v4
133
+
134
+ # - name: Setup Bun
135
+ # uses: oven-sh/setup-bun@v1
136
+
137
+ # - name: Use cached node_modules
138
+ # uses: actions/cache@v4
139
+ # with:
140
+ # path: node_modules
141
+ # key: node-modules-${{ hashFiles('**/bun.lockb') }}
142
+ # restore-keys: |
143
+ # node-modules-
144
+
145
+ # - name: Install Dependencies
146
+ # run: bun install
147
+
148
+ # - name: Set Application Key
149
+ # run: bun buddy key:generate
150
+
151
+ # - name: Prepare Git User
152
+ # run: |
153
+ # git config --global user.name "github-actions[bot]"
154
+ # git config --global user.email "action@github.com"
155
+ # git checkout -B "${{ env.FIXER_BRANCH }}"
156
+
157
+ # - name: Apply auto-fixers
158
+ # run: bun lint:fix
159
+
160
+ # - name: Create Fixer PR
161
+ # run: |
162
+ # if [[ -z $(git status --porcelain) ]]; then
163
+ # echo "Nothing to fix... Exiting."
164
+ # exit 0
165
+ # fi
166
+ # OPEN_PRS=`curl --silent -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open"`
167
+ # OPEN_FIXER_PRS=`echo ${OPEN_PRS} | grep -o "\"ref\": \"${{ env.FIXER_BRANCH }}\"" | wc -l`
168
+ # git commit -am "${{ env.TITLE }}"
169
+ # git push origin "${{ env.FIXER_BRANCH }}" --force
170
+ # if [ ${OPEN_FIXER_PRS} -eq "0" ]; then
171
+ # curl -X POST \
172
+ # -H "Accept: application/vnd.github.v3+json" \
173
+ # -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
174
+ # "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls" \
175
+ # -d "{ \"head\":\"${{ env.FIXER_BRANCH }}\", \"base\":\"${{ env.SOURCE_BRANCH }}\", \"title\":\"${{ env.TITLE }}\", \"body\":\"${{ env.DESCRIPTION }}\n\nTriggered by #${{ env.PR_NUMBER }}\" }"
176
+ # fi
177
+ # exit 1
0 commit comments