-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (21 loc) · 834 Bytes
/
main.py
File metadata and controls
28 lines (21 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
from check_issue import process_issues
from config import *
from connection import connect_to_gitlab, access_project
def main():
# Establish connection to GitLab
gl = connect_to_gitlab(GITLAB_URL, GITLAB_PRIVATE_TOKEN)
# Access the specified project
project = access_project(gl, GITLAB_PROJECT_ID)
try:
# Retrieve the latest open issues without any specific label
issues = project.issues.list(state='opened', labels=[None])
# Process each issue for checking and updating
process_issues(issues, project)
except Exception as e:
# Print out an error message if there's an issue retrieving the issues
print(f"Error retrieving issues: {e}")
exit(1)
# Hauptfunktion ausführen
if __name__ == "__main__":
main()