The logic here is a bit fragile and breaks when the chosen separator is contained in the commit message.
|
commits = gitwd.git.log("--reverse", "--pretty=format:%H - %s - %aE", "--no-merges", |
|
"--ancestry-path", f"{merge_base}..dest/{dest.branch}") |
|
|
|
logging.info("Identified upstream commits:\n%s", commits) |
|
|
|
commits_to_squash = defaultdict(list) |
|
|
|
for commit in commits.splitlines(): |
|
# Commit contains the message for logging purposes, |
|
# trim on the first space to get just the commit sha |
|
sha, commit_message, committer_email = commit.split(" - ") |
The logic here is a bit fragile and breaks when the chosen separator is contained in the commit message.
rebasebot/rebasebot/bot.py
Lines 167 to 177 in 683a41f