mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
Merge pull request #1104 from splunk/allow_external_prs
fixed bug where it did not checkout external branches
This commit is contained in:
@@ -201,7 +201,12 @@ jobs:
|
||||
- run:
|
||||
name: checkout repo
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "" ]; then
|
||||
if [[ ! -z "${CIRCLE_PULL_REQUEST}" && ! -z "${CIRCLE_PR_NUMBER}" ]]; then
|
||||
git clone https://${GITHUB_TOKEN}@github.com/splunk/security-content.git
|
||||
cd security-content
|
||||
git fetch origin pull/${CIRCLE_PR_NUMBER}/head:${CIRCLE_BRANCH}
|
||||
git checkout ${CIRCLE_BRANCH}
|
||||
elif [ "${CIRCLE_BRANCH}" == "" ]; then
|
||||
git clone https://${GITHUB_TOKEN}@github.com/splunk/security-content.git
|
||||
else
|
||||
git clone --branch ${CIRCLE_BRANCH} https://${GITHUB_TOKEN}@github.com/splunk/security-content.git
|
||||
|
||||
Reference in New Issue
Block a user