This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new a2fb5cf  Fix a refactoring bug in the artifact path parser
a2fb5cf is described below

commit a2fb5cff8b624052c2fd1ee7b6b928583f6f9586
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Jun 23 15:10:32 2025 +0100

    Fix a refactoring bug in the artifact path parser
---
 atr/routes/projects.py      | 4 +++-
 atr/tasks/checks/license.py | 2 --
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/atr/routes/projects.py b/atr/routes/projects.py
index 300d6b0..a86d613 100644
--- a/atr/routes/projects.py
+++ b/atr/routes/projects.py
@@ -394,6 +394,7 @@ def _parse_artifact_paths(artifact_paths: str) -> list[str]:
         return []
     lines = artifact_paths.split("\n")
     # This is similar to announce._download_path_suffix_validated
+    paths = []
     for path in lines:
         path = path.strip()
         if not path:
@@ -411,7 +412,8 @@ def _parse_artifact_paths(artifact_paths: str) -> list[str]:
         #     path = path + "/"
         if "/." in path:
             raise ValueError("Artifact path must not contain /.")
-    return sorted(lines)
+        paths.append(path)
+    return sorted(paths)
 
 
 async def _policy_edit(
diff --git a/atr/tasks/checks/license.py b/atr/tasks/checks/license.py
index 0004b5b..cf4c6fa 100644
--- a/atr/tasks/checks/license.py
+++ b/atr/tasks/checks/license.py
@@ -127,7 +127,6 @@ async def files(args: checks.FunctionArguments) -> str | 
None:
     if not (artifact_abs_path := await recorder.abs_path()):
         return None
     if await recorder.primary_path_is_binary():
-        _LOGGER.info(f"Skipping license files check for {artifact_abs_path} 
(rel: {args.primary_rel_path})")
         return None
 
     _LOGGER.info(f"Checking license files for {artifact_abs_path} (rel: 
{args.primary_rel_path})")
@@ -155,7 +154,6 @@ async def headers(args: checks.FunctionArguments) -> str | 
None:
     if not (artifact_abs_path := await recorder.abs_path()):
         return None
     if await recorder.primary_path_is_binary():
-        _LOGGER.info(f"Skipping license headers check for {artifact_abs_path} 
(rel: {args.primary_rel_path})")
         return None
 
     _LOGGER.info(f"Checking license headers for {artifact_abs_path} (rel: 
{args.primary_rel_path})")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to