Giter Club home page Giter Club logo

rebasebot's People

Contributors

damdo avatar elmiko avatar fedosin avatar joelspeed avatar lobziik avatar mandre avatar mdbooth avatar odvarkadaniel avatar openshift-ci[bot] avatar openshift-merge-bot[bot] avatar openshift-merge-robot avatar pierreprinetti avatar radekmanak avatar

Stargazers

 avatar

Watchers

 avatar

rebasebot's Issues

GitHub API can serve old data if depended calls are executed.

We have seen failures where the cause was GitHub not having fully processed data from our previous call.

  1. Unable to open the pull request, the push was not fuly processed.
Failed to create a pull request: 422 Validation Failed
 Response: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"No commits between openshift:master and openshift-metal3:ironic-bot-master"}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}
  1. The pull request was opened, but did not contain new commits.
    openshift/openstack-ironic-python-agent#14

Downstream commit detection fails when upstream does not contain all commits from previous rebase

When we do rebase from release branch that contains cherry-picked commits from main. The merge base marks these backport commits as downstream commits. Additionally, we incorrectly find base commit on the destination branch. Causing all downstream commits to be reapplied.

One possible solution for this may be marking the "Merge upstream into Destination" commit and trying to find it on the ancestry path from merge-base to destination branch.

Working directories are not removed

Rebasebot creates a .rebase directory in the current working directory by default. If you are not aware of this, you may end up with multiple instances of this directory in your filesystem.

To avoid this, we should consider creating a temporary directory for rebasebot to use, and remove it after the rebasebot finishes.

Change the git log format and splitting logic

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

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(" - ")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.