Skip to content

Commit 7e39fd5

Browse files
committed
ci: checkout fork branches from current project
1 parent 84d0213 commit 7e39fd5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.circleci/config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ jobs:
1111
- run:
1212
name: Clone python-keepkey (current branch)
1313
command: |
14-
git clone --depth 1 -b "$CIRCLE_BRANCH" https://github.com/keepkey/python-keepkey.git .pykk
14+
# Fork-only PR branches do not exist in keepkey/python-keepkey.
15+
# Clone the repository that triggered this CircleCI project so the
16+
# exact CIRCLE_SHA1 under review is available and verifiable.
17+
git clone --depth 1 -b "$CIRCLE_BRANCH" \
18+
"https://github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git" .pykk
19+
test "$(git -C .pykk rev-parse HEAD)" = "$CIRCLE_SHA1"
1520
cd .pykk && git submodule update --init --recursive
1621
1722
# ────────────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)