def get_git_file_info()

in src/pydolphinscheduler/resources_plugin/gitlab.py [0:0]


    def get_git_file_info(self, path: str):
        """Get file information from the file url, like repository name, user, branch, and file path."""
        self.get_index(path, Symbol.SLASH, 8)
        result = urlparse(path)
        elements = result.path.split(Symbol.SLASH)
        self._git_file_info = GitLabFileInfo(
            host=f"{result.scheme}://{result.hostname}",
            repo_name=elements[2],
            branch=elements[5],
            file_path=Symbol.SLASH.join(
                str(elements[i]) for i in range(6, len(elements))
            ),
            user=elements[1],
        )