Skip to content
Snippets Groups Projects
Commit 8944df6d authored by Sigmund, Dominik's avatar Sigmund, Dominik
Browse files

Update file script.py

parent bc16a608
No related branches found
No related tags found
No related merge requests found
...@@ -95,10 +95,10 @@ def get_gitlab_version(): ...@@ -95,10 +95,10 @@ def get_gitlab_version():
return 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 # 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() gl.auth()
# Get the number of projects # Get the number of projects
...@@ -222,7 +222,7 @@ api_token, confluence_token = load_api_token() ...@@ -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')) subject = 'Monthly GitLab Report - {month} {year}'.format(month=datetime.datetime.now().strftime('%B'), year=datetime.datetime.now().strftime('%Y'))
# Get GitLab information # 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 # Compose the email body as a dictionary
email_body = { email_body = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment