chnage authentication

This commit is contained in:
Muzahid 2022-03-14 23:34:35 +05:30
parent afb9fe2235
commit 2bba510ad1
Signed by: cis-muzahid
GPG Key ID: 1DC85E7D3AB613EA
1 changed files with 3 additions and 4 deletions

View File

@ -1,10 +1,9 @@
from os import listdir, walk
from os import listdir
from os.path import exists, isfile, join, islink, isdir
import requests
import re
token = "abc"
request_data = {
"project": "testproject",
"comments": "testcomment",
@ -94,13 +93,13 @@ def _get_dockerfile_contents(jobname):
return res + dockerfile_extra_contents[os_codename]
def trigger_child_hooks(buildbotUrl: str, repository, branch, directory=".buildbot", secret):
def trigger_child_hooks(buildbotUrl: str, repository, branch, directory=".buildbot"):
request_url = buildbotUrl + ty
# List all jobs in the directory
jobs = list_jobs(directory)
request_headers = {
"Content-Type": "application/x-www-form-urlencoded",
'Authorization': f'token {secret}',
'X-Multibuild-Trigger': secret,
"Accept": "text/plain",
}