Skip to content

Commit d85e017

Browse files
committed
add logging and consider 'target_dir' attr name
1 parent cff761e commit d85e017

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/automated_ingestion/eessi_task.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ def _read_pull_request_dir_from_file(self, task_pointer_file: str = None, branch
481481
task_pointer_file = self.description.task_object.remote_file_path
482482
if branch_name is None:
483483
branch_name = self.git_repo.default_branch
484+
log_message(LoggingScope.TASK_OPS, 'INFO', "reading pull request directory from file '%s' in branch '%s'",
485+
task_pointer_file, branch_name)
484486

485487
# read the pull request directory from the file in the given branch
486488
content = self.git_repo.get_contents(task_pointer_file, ref=branch_name)
@@ -491,7 +493,8 @@ def _read_pull_request_dir_from_file(self, task_pointer_file: str = None, branch
491493
# Parse into dictionary
492494
config_dict = self._read_dict_from_string(content_str)
493495

494-
return config_dict.get('pull_request_dir', None)
496+
target_dir = config_dict.get('target_dir', None)
497+
return config_dict.get('pull_request_dir', target_dir)
495498

496499
@log_function_entry_exit()
497500
def _determine_pull_request_dir(self, task_pointer_file: str = None, branch_name: str = None) -> str:

0 commit comments

Comments
 (0)