Skip to content

Commit 6460fa0

Browse files
committed
test auto-merge
1 parent 46b3d6e commit 6460fa0

3 files changed

Lines changed: 20 additions & 17 deletions

File tree

.github/workflows/dependabot.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ permissions:
1010
jobs:
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}}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/node": "^22.16.0",
3636
"@vercel/ncc": "^0.38.3",
3737
"linefix": "^0.1.1",
38-
"typescript": "5.8.3"
38+
"typescript": "5.9.2"
3939
},
4040
"scripts": {
4141
"prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist"

0 commit comments

Comments
 (0)