Skip to content

Commit c422961

Browse files
chore(ci): use branch name instead of ref name
1 parent 654bdf3 commit c422961

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/js.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ jobs:
77
contents: write
88
steps:
99
- uses: actions/checkout@v4
10-
with:
11-
fetch-depth: 2
1210
- uses: oven-sh/setup-bun@v2
1311
- run: bun install
1412

@@ -23,8 +21,9 @@ jobs:
2321
- name: fix
2422
if: failure() && github.event_name == 'pull_request'
2523
run: |
24+
git switch ${{ github.event.pull_request.head.ref }}
2625
bun lint --fix
2726
git config user.name "github-actions[bot]"
2827
git config user.email "github-actions[bot]@users.noreply.github.com"
2928
git commit --all -m "fix: auto-fix eslint errors"
30-
git push origin HEAD:refs/heads/${{ github.head_ref }}
29+
git push

0 commit comments

Comments
 (0)