summaryrefslogtreecommitdiff
path: root/buildscripts/patch_builds/change_data.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/patch_builds/change_data.py')
-rw-r--r--buildscripts/patch_builds/change_data.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/buildscripts/patch_builds/change_data.py b/buildscripts/patch_builds/change_data.py
index d5ddbb9d849..0ecab81cb39 100644
--- a/buildscripts/patch_builds/change_data.py
+++ b/buildscripts/patch_builds/change_data.py
@@ -1,5 +1,6 @@
"""Tools for detecting changes in a commit."""
from typing import Any, Set
+import os
from git import Repo, DiffIndex
import structlog
@@ -63,4 +64,9 @@ def find_changed_files(repo: Repo) -> Set[str]:
untracked_files = set(repo.untracked_files)
LOGGER.info("untracked files", files=untracked_files, diff="untracked diff")
- return work_tree_files.union(index_files).union(untracked_files)
+ paths = work_tree_files.union(index_files).union(untracked_files)
+
+ return [
+ os.path.relpath(f"{repo.working_dir}/{os.path.normpath(path)}", os.getcwd())
+ for path in paths
+ ]