@@ -104,8 +104,9 @@ jobs:
104104 # Merge the base branch (which is usually master) to apply formatting using the latest configurations.
105105 - name : Merge base branch
106106 run : |
107- git config user.name 'mlflow-app[bot]'
108- git config user.email 'mlflow-app[bot]@users.noreply.github.com'
107+ # This identity is only used for the temporary merge commit and is not pushed.
108+ git config user.name 'name'
109+ git config user.email 'email'
109110 git remote add base https://github.com/${{ needs.check-comment.outputs.base_repo }}.git
110111 git fetch base ${{ needs.check-comment.outputs.base_ref }}
111112 git merge base/${{ needs.check-comment.outputs.base_ref }}
@@ -186,7 +187,7 @@ jobs:
186187 echo "reformatted=$reformatted" >> $GITHUB_OUTPUT
187188
188189 - name : Upload patch
189- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
190+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
190191 with :
191192 name : ${{ github.run_id }}.diff
192193 path : ${{ github.run_id }}.diff
@@ -201,7 +202,7 @@ jobs:
201202 outputs :
202203 head_sha : ${{ steps.push.outputs.head_sha }}
203204 steps :
204- - uses : actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
205+ - uses : actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
205206 id : app-token
206207 with :
207208 app-id : ${{ secrets.APP_ID }}
@@ -229,19 +230,34 @@ jobs:
229230 exit 1
230231 fi
231232
233+ - name : Configure git
234+ env :
235+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
236+ PR_NUMBER : ${{ needs.check-comment.outputs.pull_number }}
237+ REPO : ${{ github.repository }}
238+ run : |
239+ AUTHOR=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json author --jq '.author')
240+ IS_BOT=$(echo "$AUTHOR" | jq -r '.is_bot')
241+ if [ "$IS_BOT" = "false" ]; then
242+ LOGIN=$(echo "$AUTHOR" | jq -r '.login')
243+ else
244+ LOGIN="mlflow-app[bot]"
245+ fi
246+ ID=$(gh api "users/$LOGIN" --jq '.id')
247+ git config user.name "$LOGIN"
248+ git config user.email "${ID}+${LOGIN}@users.noreply.github.com"
249+
232250 - name : Merge base branch
233251 env :
234252 BASE_REPO : ${{ needs.check-comment.outputs.base_repo }}
235253 BASE_REF : ${{ needs.check-comment.outputs.base_ref }}
236254 run : |
237- git config user.name 'mlflow-app[bot]'
238- git config user.email 'mlflow-app[bot]@users.noreply.github.com'
239255 git remote add base https://github.com/${BASE_REPO}.git
240256 git fetch base $BASE_REF
241257 git merge base/${BASE_REF}
242258
243259 - name : Download patch
244- uses : actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2 .1
260+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0 .1
245261 with :
246262 name : ${{ github.run_id }}.diff
247263 path : /tmp
0 commit comments