@@ -34,15 +34,16 @@ jobs:
3434 if : ${{ !inputs.head_sha }}
3535 run : |
3636 set -x
37- [ "$(gh pr view "$GITHUB_SERVER /$GITHUB_REPOSITORY/pull/$PR_ID" \
38- --json headRepositoryOwner --jq '.headRepositoryOwner.name') = "$GITHUB_REPOSITORY_OWNER" ]
37+ [ "$(gh pr view "$GITHUB_SERVER_URL /$GITHUB_REPOSITORY/pull/$PR_ID" \
38+ --json headRepositoryOwner --jq '.headRepositoryOwner.name')" = "$GITHUB_REPOSITORY_OWNER" ]
3939 env :
4040 PR_ID : ${{ inputs.pr_id }}
4141 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4242
4343 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4444 with :
45- ref : refs/pulls/${{ inputs.pr_id }}/head
45+ ref : refs/pull/${{ inputs.pr_id }}/head
46+ fetch-depth : ${{ !inputs.fix_conflicts && 1 || 0 }}
4647
4748 - name : Verify if provided SHA matches PR head
4849 if : ${{ inputs.head_sha }}
@@ -52,16 +53,19 @@ jobs:
5253 env :
5354 EXPECTED : ${{ inputs.head_sha }}
5455
55- - name : Git config
56+ - name : Setup git author
5657 run : |
57- git config --global user.email "41898282+ github-actions[ bot]@users.noreply.github.com "
58- git config --global user.name "github-actions[bot] "
58+ git config --local user.email "github-bot@iojs.org "
59+ git config --local user.name "Node.js GitHub Bot "
5960
6061 - name : Merge base branch
6162 if : ${{ inputs.fix_conflicts }}
6263 run : |
63- git fetch "$GITHUB_SERVER/$GITHUB_REPOSITORY.git" HEAD
64- git merge FETCH_HEAD --no-edit -s ours
64+ set -x
65+ git merge "$(gh pr view "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/$PR_ID" --json baseRefName --jq '.baseRefName')" --no-edit -s ours
66+ env :
67+ PR_ID : ${{ inputs.pr_id }}
68+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6569
6670 - name : Install Node
6771 uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
0 commit comments