in src/pydolphinscheduler/resources_plugin/gitlab.py [0:0]
def read_file(self, suf: str):
"""Get the content of the file.
The address of the file is the prefix of the resource plugin plus the parameter suf.
"""
path = urljoin(self.prefix, suf)
self.get_git_file_info(path)
gl = self.authentication()
project = gl.projects.get(
f"{self._git_file_info.user}/{self._git_file_info.repo_name}"
)
return (
project.files.get(
file_path=self._git_file_info.file_path, ref=self._git_file_info.branch
)
.decode()
.decode()
)