From d23daf880f0295a4757d93f7c5867437cb45a809 Mon Sep 17 00:00:00 2001 From: Ori Kotek Date: Tue, 25 Jul 2023 13:58:48 +0300 Subject: [PATCH] Change gitlab API to use oauth_token instead of PAT (PAT shuold work as well) --- pr_agent/git_providers/gitlab_provider.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pr_agent/git_providers/gitlab_provider.py b/pr_agent/git_providers/gitlab_provider.py index 9ee1c0bf..b878ce33 100644 --- a/pr_agent/git_providers/gitlab_provider.py +++ b/pr_agent/git_providers/gitlab_provider.py @@ -14,7 +14,6 @@ from .git_provider import EDIT_TYPE, FilePatchInfo, GitProvider class GitLabProvider(GitProvider): - def __init__(self, merge_request_url: Optional[str] = None, incremental: Optional[bool] = False): gitlab_url = settings.get("GITLAB.URL", None) if not gitlab_url: @@ -23,8 +22,8 @@ class GitLabProvider(GitProvider): if not gitlab_access_token: raise ValueError("GitLab personal access token is not set in the config file") self.gl = gitlab.Gitlab( - gitlab_url, - gitlab_access_token + url=gitlab_url, + oauth_token=gitlab_access_token ) self.id_project = None self.id_mr = None