@@ -10,19 +10,19 @@ permissions:
1010jobs :
1111 automerge :
1212 runs-on : ubuntu-latest
13- if : github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'Swatinem/rust-cache'
13+ # if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'Swatinem/rust-cache'
1414 steps :
15- - name : Fetch metadata
16- id : metadata
17- uses : dependabot/fetch-metadata@v2
18- with :
19- github-token : " ${{ secrets.GITHUB_TOKEN }}"
15+ # - name: Fetch metadata
16+ # id: metadata
17+ # uses: dependabot/fetch-metadata@v2
18+ # with:
19+ # github-token: "${{ secrets.GITHUB_TOKEN }}"
2020 - uses : actions/checkout@v5
2121 with :
2222 fetch-depth : 2
2323 # if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
2424 - name : Check if package-lock.json has been changed
25- if : steps.metadata.outputs.update-type == 'version-update:semver-patch'
25+ # if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
2626 id : npm
2727 env :
2828 PR_URL : ${{github.event.pull_request.html_url}}
@@ -40,20 +40,23 @@ jobs:
4040 node-version : 20.x
4141 cache : npm
4242 - name : Re-generate and commit dist/ if changed
43+ id : amend
4344 if : steps.npm.outputs.changed != ''
4445 run : |
4546 npm ci
4647 npm run prepare
4748 if ! git diff --quiet dist/*/index.js; then
4849 echo "dist/ changed, amending last commit"
49- git config user.email "swatinem@swatinem.de"
50- git config user.name "Arpad Borsos"
51- git add -u -- dist/
52- git commit --amend --no-edit --no-reset-author
50+ export $(git log -1 --pretty=format:'GIT_COMMITTER_NAME=%cn GIT_COMMITTER_EMAIL=%ce GIT_AUTHOR_NAME=%an GIT_AUTHOR_EMAIL=%ae')
51+ git fetch --unshallow
52+ echo "before amend:" && git show --name-only --pretty=
53+ git commit --amend --no-edit --no-reset-author -- dist/*/index.js
54+ echo "after amend:" && git show --name-only --pretty=
5355 git push --force-with-lease origin HEAD
56+ echo "changed=true" >> $GITHUB_OUTPUT
5457 fi
5558 - name : Auto-merge Patch PRs
56- if : steps.metadata.outputs.update-type == 'version-update:semver-patch'
59+ # if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
5760 run : gh pr merge --auto --merge "$PR_URL"
5861 env :
5962 PR_URL : ${{github.event.pull_request.html_url}}
0 commit comments