Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround: change separator to something less common #32

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rebasebot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _do_rebase(gitwd, source: GitHubBranch, dest: GitHubBranch, source_repo, tag

# Find the list of commits between the merge base and the destination head
# This should be the list of commits we are carrying on top of the UPSTREAM
commits = gitwd.git.log("--reverse", "--pretty=format:%H - %s - %aE", "--no-merges",
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)
Expand All @@ -174,7 +174,7 @@ def _do_rebase(gitwd, source: GitHubBranch, dest: GitHubBranch, source_repo, tag
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(" - ")
sha, commit_message, committer_email = commit.split(" || ", 2)

if _in_excluded_commits(sha, exclude_commits):
logging.info("Explicitly dropping commit from rebase: %s", sha)
Expand Down