From 8944df6d8c8a254a8f3d236a8ccfc55912d3dd02 Mon Sep 17 00:00:00 2001
From: "Sigmund, Dominik" <dominik.sigmund@br.de>
Date: Fri, 28 Jul 2023 21:34:17 +0000
Subject: [PATCH] Update file script.py

---
 script.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/script.py b/script.py
index aa38721..62654d3 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 = {
-- 
GitLab