Skip to content

Commit

Permalink
Merge pull request #2965 from chaoss/commit-message-patch3
Browse files Browse the repository at this point in the history
Merging full commit message patch
  • Loading branch information
sgoggins authored Jan 8, 2025
2 parents a31a04c + 13bd2ed commit 5544f52
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions augur/tasks/git/facade_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,27 @@ def facade_fetch_missing_commit_messages(repo_git):

for hash in missing_message_hashes:
#Get the huge list of commits to process.
logger.debug(f"The hash object is: {hash}. It has a type of: {type(hash)}")

try:
escaped_hash = hash['cmt_commit_hash']
except (TypeError, IndexError):
escaped_hash = hash

absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path, repo.repo_name)
repo_loc = (f"{absolute_path}/.git")

try:
commit_message = check_output(
f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split()
f"git --git-dir {repo_loc} log --format=%B -n 1 {escaped_hash}".split()
#f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split()
).decode('utf-8').strip()

msg_record = {
'repo_id' : repo.repo_id,
'cmt_msg' : commit_message,
'cmt_hash' : hash,
#'cmt_hash' : hash,
'cmt_hash': escaped_hash if isinstance(escaped_hash, str) else escaped_hash['cmt_commit_hash'],
'tool_source' : 'Facade',
'tool_version' : '0.78?',
'data_source' : 'git',
Expand Down

0 comments on commit 5544f52

Please sign in to comment.