Skip to content

Commit 79f2389

Browse files
Fix clone for private repos (#7)
1 parent 61eac9f commit 79f2389

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ if [ $pull_request_id == "null" ]; then
1212
exit 1
1313
fi
1414

15-
eval git clone "https://${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" ${GITHUB_REPOSITORY}
15+
maintainer=${GITHUB_REPOSITORY%/*}
16+
eval git clone "https://${maintainer}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" ${GITHUB_REPOSITORY}
1617
cd $GITHUB_REPOSITORY
1718
eval git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
1819
eval git fetch origin pull/$pull_request_id/head:$branch_name

0 commit comments

Comments
 (0)