Skip to content

Commit 3b6618f

Browse files
committed
add add_path to add_and_commit
1 parent 2119dbd commit 3b6618f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/1-fetch/gcs_fetched.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,11 @@ def main():
376376

377377
# Add and commit changes
378378
shared.add_and_commit(
379-
PATHS["data_phase"], "Added and committed new reports"
379+
PATHS["repo"], PATHS["data_phase"], "Added and committed new reports"
380380
)
381381

382382
# Push changes
383-
shared.push_changes(PATHS["data_phase"])
383+
shared.push_changes(PATHS["repo"])
384384

385385

386386
if __name__ == "__main__":

scripts/shared.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ def fetch_and_merge(repo_path, branch="main"):
8787
raise QuantifyingException(f"Error during fetch and merge: {e}", 1)
8888

8989

90-
def add_and_commit(repo_path, message):
90+
def add_and_commit(repo_path, add_path, message):
9191
try:
9292
repo = Repo(repo_path)
9393
if not repo.is_dirty(untracked_files=True):
9494
logging.info("No changes to commit")
9595
return
96-
repo.git.add(update=True)
96+
repo.index.add([add_path])
9797
repo.index.commit(message)
9898
logging.info("Changes committed")
9999
except InvalidGitRepositoryError:

0 commit comments

Comments
 (0)