This repository was archived by the owner on Dec 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ A [Concourse](http://concourse.ci/) [resource](http://concourse.ci/resources.htm
1010 * ` branch ` - the branch currently being monitored (default: ` master ` )
1111 * ` context ` - a label to differentiate this status from the status of other systems (default: ` default ` )
1212 * ` endpoint ` - GitHub API endpoint (default: ` https://api.github.com ` )
13+ * ` skip_ssl_verification ` - Disable certificate validation for GitHub API calls (default: ` false ` )
1314
1415
1516## Behavior
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ load_source () {
2525 "source_access_token": .source.access_token,
2626 "source_branch": ( .source.branch // "master" ),
2727 "source_context": ( .source.context // "default" ),
28- "source_endpoint": ( .source.endpoint // "https://api.github.com" )
28+ "source_endpoint": ( .source.endpoint // "https://api.github.com" ),
29+ "skip_ssl_verification": ( .source.skip_ssl_verification // "false" )
2930 } | to_entries[] | .key + "=" + @sh "\(.value)"
3031 ' < /tmp/stdin )
3132}
@@ -42,5 +43,10 @@ buildtpl () {
4243}
4344
4445curlgh () {
45- curl -s -H " Authorization: token $source_access_token " $@
46+ if $skip_ssl_verification ; then
47+ skip_verify_arg=" -k"
48+ else
49+ skip_verify_arg=" "
50+ fi
51+ curl $skip_verify_arg -s -H " Authorization: token $source_access_token " $@
4652}
You can’t perform that action at this time.
0 commit comments