This repository was archived by the owner on Jan 31, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
stakater-create-environment/helm/templates Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -80,21 +80,21 @@ spec:
80
80
echo "$FILE exists."
81
81
GIT_TOKEN=`cat $FILE`
82
82
83
- if [[ $params.GIT_URL == *github.com* ]]; then
83
+ if [[ $( params.GIT_URL) == *github.com* ]]; then
84
84
echo "This is a GitHub repository."
85
85
PR_FIRST_COMMIT_HASH=`curl --header "Authorization: token $GIT_TOKEN" \
86
86
$(params.PULL_REQUEST_COMMITS_API) | jq -r 'first.sha' | head -c 8`
87
87
88
88
# Check if the URL contains "gitlab.com"
89
- elif [[ $params.GIT_URL == *gitlab.com* ]]; then
89
+ elif [[ $( params.GIT_URL) == *gitlab.com* ]]; then
90
90
echo "This is a GitLab repository."
91
91
PR_FIRST_COMMIT_HASH=`curl --header "PRIVATE-TOKEN: $GIT_TOKEN" \
92
92
$(params.PULL_REQUEST_COMMITS_API) | jq -r '.sha // .head?.sha' | head -c 8`
93
93
fi
94
94
else
95
- if [[ $params.GIT_URL == *github.com* ]]; then
95
+ if [[ $( params.GIT_URL) == *github.com* ]]; then
96
96
PR_FIRST_COMMIT_HASH=`curl $(params.PULL_REQUEST_COMMITS_API) | jq -r 'first.sha' | head -c 8`
97
- elif [[ $repo_url == *gitlab.com* ]]; then
97
+ elif [[ $(params.GIT_URL) == *gitlab.com* ]]; then
98
98
PR_FIRST_COMMIT_HASH=`curl $(params.PULL_REQUEST_COMMITS_API) | jq -r '.sha // .head?.sha' | head -c 8`
99
99
fi
100
100
fi
You can’t perform that action at this time.
0 commit comments