Update get_repo_settings to decode file from target branch in gitlab_provider.py

This commit is contained in:
Ori Kotek
2023-10-30 17:01:49 +02:00
parent e74bb80668
commit 4bda9dfe04

View File

@ -315,7 +315,7 @@ class GitLabProvider(GitProvider):
def get_repo_settings(self):
try:
contents = self.gl.projects.get(self.id_project).files.get(file_path='.pr_agent.toml', ref=self.mr.source_branch).decode()
contents = self.gl.projects.get(self.id_project).files.get(file_path='.pr_agent.toml', ref=self.mr.target_branch).decode()
return contents
except Exception:
return ""