mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 08:12:55 +00:00
fix headers typo
This commit is contained in:
parent
7d1d21c988
commit
cb72cfd724
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ def do_fork(logger, base_url, token, repo_name, namespace, cli_name):
|
|||
fork_id = rv.json()['id']
|
||||
try:
|
||||
# Unprotect c9s in fork
|
||||
rv = requests.delete('{0}/projects/{1}/protected_branches/{2}'.format(api_url, fork_id, 'c9s'), headers=header)
|
||||
rv = requests.delete('{0}/projects/{1}/protected_branches/{2}'.format(api_url, fork_id, 'c9s'), headers=headers)
|
||||
except ConnectionError as error:
|
||||
error_msg = ('The connection to API failed while trying to unprotect c9s branch'
|
||||
'in the fork. The error was: {0}'.format(str(error)))
|
||||
|
@ -83,7 +83,7 @@ def do_fork(logger, base_url, token, repo_name, namespace, cli_name):
|
|||
'allowed_to_push': [{'access_level': 40}],
|
||||
'allowed_to_merge': [{'access_level': 40}],
|
||||
}
|
||||
rv = requests.post('{0}/projects/{1}/protected_branches'.format(api_url, fork_id), json=data, headers=header)
|
||||
rv = requests.post('{0}/projects/{1}/protected_branches'.format(api_url, fork_id), json=data, headers=headers)
|
||||
except ConnectionError as error:
|
||||
error_msg = ('The connection to API failed while trying to reprotect c9s branch'
|
||||
'in the fork fork. The error was: {0}'.format(str(error)))
|
||||
|
|
Loading…
Add table
Reference in a new issue