@@ -41,7 +41,7 @@ report_github_status() {
41
41
debug " COMMIT_SHA: $COMMIT_SHA "
42
42
debug " STATUS: $STATUS "
43
43
debug " DESCRIPTION: $DESCRIPTION "
44
- curl -s -H " Authorization: token ${GITHUB_TOKEN} " - X POST \
44
+ curl -s -X POST \
45
45
-d " {\" state\" : \" ${STATUS} \" , \" description\" : \" $DESCRIPTION \" , \" context\" : \" deploy\" }" \
46
46
" https://api.github.com/repos/${REPOSITORY_NAME} /statuses/${COMMIT_SHA} " > /dev/null
47
47
}
@@ -139,16 +139,11 @@ parse_params() {
139
139
140
140
debug " DEBUG: $DEBUG "
141
141
debug " RUN_DIR: $RUN_DIR "
142
- debug " GITHUB_TOKEN: $GITHUB_TOKEN "
143
142
debug " REPOSITORY_NAME: $REPOSITORY_NAME "
144
143
debug " BRANCH: $BRANCH "
145
144
debug " DEPLOY_SCRIPT: $DEPLOY_SCRIPT "
146
145
debug " LOCK_LOCATION: $LOCK_LOCATION "
147
146
148
- if [ -z " ${GITHUB_TOKEN} " ]; then
149
- error " Github token is required."
150
- usage
151
- fi
152
147
if [ -z " ${REPOSITORY_NAME} " ]; then
153
148
error " Repository name is required."
154
149
usage
@@ -160,7 +155,7 @@ parse_params() {
160
155
parse_params " $@ "
161
156
162
157
# Check if a new commit exists
163
- HEAD_COMMIT=$( curl -s -H " Authorization: token ${GITHUB_TOKEN} " " https://api.github.com/repos/${REPOSITORY_NAME} /commits/${BRANCH} " | jq -r ' .sha' )
158
+ HEAD_COMMIT=$( curl -s " https://api.github.com/repos/${REPOSITORY_NAME} /commits/${BRANCH} " | jq -r ' .sha' )
164
159
LOCAL_COMMIT=$( cd $SOURCE && git rev-parse HEAD)
165
160
166
161
debug " HEAD_COMMIT: $HEAD_COMMIT "
0 commit comments