Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Get commits from HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
scholtzan committed Oct 19, 2022
1 parent f980324 commit cd2047c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions metric_config_parser/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def from_github_repo(
external_configs = []

for config_file in tmp_dir.glob("*.toml"):
last_modified = next(repo.iter_commits("main", paths=config_file)).committed_date
last_modified = next(repo.iter_commits("HEAD", paths=config_file)).committed_date
config_json = toml.load(config_file)

if "project" in config_json:
Expand All @@ -314,7 +314,7 @@ def from_github_repo(

outcomes = []
for outcome_file in tmp_dir.glob(f"**/{OUTCOMES_DIR}/*/*.toml"):
commit_hash = next(repo.iter_commits("main", paths=outcome_file)).hexsha
commit_hash = next(repo.iter_commits("HEAD", paths=outcome_file)).hexsha

outcomes.append(
Outcome(
Expand All @@ -329,7 +329,7 @@ def from_github_repo(
default_configs = []
for default_config_file in tmp_dir.glob(f"**/{DEFAULTS_DIR}/*.toml"):
last_modified = next(
repo.iter_commits("main", paths=default_config_file)
repo.iter_commits("HEAD", paths=default_config_file)
).committed_date

default_config_json = toml.load(default_config_file)
Expand All @@ -353,7 +353,7 @@ def from_github_repo(
definitions = []
for definitions_config_file in tmp_dir.glob(f"**/{DEFINITIONS_DIR}/*.toml"):
last_modified = next(
repo.iter_commits("main", paths=definitions_config_file)
repo.iter_commits("HEAD", paths=definitions_config_file)
).committed_date

definitions.append(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ def text_from_file(path):
[console_scripts]
metric-config-parser=metric_config_parser.cli:cli
""",
version="2022.10.9",
version="2022.10.10",
)

0 comments on commit cd2047c

Please sign in to comment.