Skip to content

Commit 6a061f5

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

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/commit.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@ jobs:
1111
commitlint:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Checkout "main" branch
15-
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
18-
ref: ${{ github.event.pull_request.base.ref }}
19-
20-
- name: Checkout the current pull request branch
21-
run: git checkout ${{ github.event.pull_request.head.ref }}
14+
- name: Checkout PR and "main" branches
15+
run: |
16+
git fetch --no-tags --depth=1 origin main +refs/pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }}
17+
git checkout ${{ github.event.pull_request.head.ref }}
2218
2319
- name: Install dependencies
2420
run: npm ci

0 commit comments

Comments
 (0)