From cb72cfd72440736d3451c2a13e04ff770afcb663 Mon Sep 17 00:00:00 2001 From: lrossett Date: Jun 15 2021 21:27:52 +0000 Subject: fix headers typo --- diff --git a/src/centpkg/utils.py b/src/centpkg/utils.py index 6d27b0e..8bc3b4c 100644 --- a/src/centpkg/utils.py +++ b/src/centpkg/utils.py @@ -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)))