diff --git a/script.py b/script.py index aa38721df08a32b646be9babbf6f3bf4ec1f8bc5..62654d30ffc1b8fd237709554f00f28ecc112e8f 100644 --- a/script.py +++ b/script.py @@ -95,10 +95,10 @@ def get_gitlab_version(): return gitlab_version -def get_gitlab_info(): +def get_gitlab_info(api_token): # Replace 'YOUR_GITLAB_URL' and 'YOUR_PRIVATE_TOKEN' with your GitLab URL and private token - gl = gitlab.Gitlab(gitlab_url, private_token) + gl = gitlab.Gitlab(gitlab_url, api_token) gl.auth() # Get the number of projects @@ -222,7 +222,7 @@ api_token, confluence_token = load_api_token() subject = 'Monthly GitLab Report - {month} {year}'.format(month=datetime.datetime.now().strftime('%B'), year=datetime.datetime.now().strftime('%Y')) # Get GitLab information -num_projects, num_users, admin_users_list, free_space_on_disk = get_gitlab_info() +num_projects, num_users, admin_users_list, free_space_on_disk = get_gitlab_info(api_token) # Compose the email body as a dictionary email_body = {