mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 04:40:06 +06:00
Fix a minor security issue (#38815)
fix Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
93445aed06
commit
4c3c177ecf
@ -6,10 +6,15 @@ import subprocess
|
||||
def get_runner_status(target_runners, token):
|
||||
offline_runners = []
|
||||
|
||||
cmd = (
|
||||
f'curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer {token}"'
|
||||
" https://api.github.com/repos/huggingface/transformers/actions/runners"
|
||||
)
|
||||
cmd = [
|
||||
"curl",
|
||||
"-H",
|
||||
"Accept: application/vnd.github+json",
|
||||
"-H",
|
||||
f"Authorization: Bearer {token}",
|
||||
"https://api.github.com/repos/huggingface/transformers/actions/runners",
|
||||
]
|
||||
|
||||
output = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE)
|
||||
o = output.stdout.decode("utf-8")
|
||||
status = json.loads(o)
|
||||
|
Loading…
Reference in New Issue
Block a user