Refactor get_repo_settings method in gitlab_provider.py to decode file contents

This commit is contained in:
Ori Kotek 2023-10-30 16:45:47 +02:00
parent e06fb534d3
commit e74bb80668
No known key found for this signature in database
GPG key ID: 5AAFD0757D1EAC4C

View file

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