Skip to content

Commit d690fd0

Browse files
committed
Allow finding external contributor's branch
1 parent 6bced1c commit d690fd0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/commit.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ jobs:
1111
commitlint:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Checkout "main" branch
14+
- name: Checkout repository
1515
uses: actions/checkout@v4
1616
with:
17-
fetch-depth: 0
18-
ref: ${{ github.event.pull_request.base.ref }}
17+
fetch-depth: 1
1918

20-
- name: Checkout the current pull request branch
21-
run: git checkout ${{ github.event.pull_request.head.ref }}
19+
- name: Checkout PR branch
20+
run: |
21+
git fetch --no-tags --depth=1 origin main +refs/pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }}
22+
git checkout ${{ github.event.pull_request.head.ref }}
2223
2324
- name: Install dependencies
2425
run: npm ci

0 commit comments

Comments
 (0)