Support repo-specific configuration file

This commit is contained in:
Ori Kotek
2023-08-01 17:27:25 +03:00
parent 450f410e3c
commit 696e2bd6ff
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ class GitLabProvider(GitProvider):
if repo_settings:
repo_settings_file = None
try:
fd, repo_settings_file = tempfile.mkstemp(suffix='.yaml')
fd, repo_settings_file = tempfile.mkstemp(suffix='.toml')
os.write(fd, repo_settings.encode())
get_settings().load_file(repo_settings_file)
finally:
@ -268,7 +268,7 @@ class GitLabProvider(GitProvider):
def get_repo_settings(self):
try:
contents = self.gl.projects.get(self.id_project).files.get(file_path='.pr_agent.yaml', ref=self.mr.source_branch).decode()
contents = self.gl.projects.get(self.id_project).files.get(file_path='.pr_agent.toml', ref=self.mr.source_branch).decode()
return contents
except Exception:
return ""