github: redact token in the log

This commit is contained in:
Cheng XU 2019-07-13 23:35:07 +08:00
parent 739c06229d
commit 4f29af08f8
No known key found for this signature in database
GPG Key ID: B19F15830AB4E690

View File

@ -195,7 +195,7 @@ module GitHub
args += ["--dump-header", headers_tmpfile.path] args += ["--dump-header", headers_tmpfile.path]
output, errors, status = curl_output("--location", url.to_s, *args) output, errors, status = curl_output("--location", url.to_s, *args, secrets: [token])
output, _, http_code = output.rpartition("\n") output, _, http_code = output.rpartition("\n")
output, _, http_code = output.rpartition("\n") if http_code == "000" output, _, http_code = output.rpartition("\n") if http_code == "000"
headers = headers_tmpfile.read headers = headers_tmpfile.read