diff --git a/pyproject.toml b/pyproject.toml index 935f70f..a5e51ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "codeplag" -version = "0.6.3" +version = "0.6.4" description = "Code plagiarism searching package." authors = [ { name = "Artyom Semidolin, Dmitry Nikolaev, Alexander Evsikov" } diff --git a/src/webparsers/github_parser.py b/src/webparsers/github_parser.py index 735a3c1..3fbdd86 100644 --- a/src/webparsers/github_parser.py +++ b/src/webparsers/github_parser.py @@ -304,9 +304,6 @@ def _get_files_generator_from_node_list( ) -> Iterator[WorkInfo]: for node in node_list: current_path = f"/{node['path']}" - full_link = ( - f"{_GH_URL}{dir_url.owner}/{dir_url.repo}/tree/{dir_url.branch}/{current_path[2:]}" - ) node_type = node["type"] if node_type == "dir": commit_info = self._get_commit_info( @@ -320,6 +317,9 @@ def _get_files_generator_from_node_list( path=current_path, path_regexp=path_regexp, ) + full_link = ( + f"{_GH_URL}{dir_url.owner}/{dir_url.repo}/blob/{dir_url.branch}{current_path}" + ) if ( node_type != "file" or not self._is_accepted_extension(node["name"]) diff --git a/test/auto/functional/test_check.py b/test/auto/functional/test_check.py index c778dbb..26eef36 100644 --- a/test/auto/functional/test_check.py +++ b/test/auto/functional/test_check.py @@ -92,7 +92,7 @@ def test_compare_cpp_files(cmd: list[str], out: bytes, found_plag: bool): ), ( ["--github-urls", *PY_GITHUB_FILES, PY_GITHUB_DIR], - b"Getting works features from GitHub urls", + b"Getting works features from", False, ), (