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

231: The merge bot cannot create merge conflict PRs #361

Closed
wants to merge 1 commit into from

Conversation

edvbld
Copy link
Member

@edvbld edvbld commented Jan 16, 2020

Hi all,

please review this patch that fixes the merge bot. The merge bot is able to
automatically merge commits from a branch in one repository to a branch in
another repository. When the merge bot encounters a merge conflict it is
supposed to open a PR describing the conflict.

This didn't work because I forgot to include a personal fork for the bot when
writing the code the first time around. This patch fixes and makes the merge bot
aware of a personal fork it can use for creating PRs.

I also had to update TestPullRequest a little bit to make it work with pull
requests between two different TestHostedRepository instances.

Finally I also added the new method Repository.prune. It isn't currently used
(besides by the unit test), but I used it at one point in time during this
rewrite of the merge bot and I have a feeling we might need it again soon, so I
decided to let it stay and be part of the patch.

Thanks,
Erik

Testing

  • make test on Linux x64 (includes unit tests for the merge bot)

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Issue

SKARA-231: The merge bot cannot create merge conflict PRs

Approvers

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 16, 2020

👋 Welcome back ehelin! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 17, 2020

Webrevs

Copy link
Member

@rwestberg rwestberg left a comment

Looks good!

@openjdk openjdk bot removed the rfr label Jan 17, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Jan 17, 2020

@edvbld This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

231: The merge bot cannot create merge conflict PRs

Reviewed-by: rwestberg
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

➡️ To integrate this PR with the above commit message, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jan 17, 2020
@edvbld
Copy link
Member Author

@edvbld edvbld commented Jan 17, 2020

/integrate

@openjdk openjdk bot closed this Jan 17, 2020
@openjdk openjdk bot added integrated and removed ready labels Jan 17, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Jan 17, 2020

@edvbld
Pushed as commit a667c28.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 17, 2020

Mailing list message from Erik Helin on skara-dev:

Changeset: a667c28
Author: Erik Helin <ehelin at openjdk.org>
Date: 2020-01-17 09:40:57 +0000
URL: https://git.openjdk.java.net/skara/commit/a667c285

231: The merge bot cannot create merge conflict PRs

Reviewed-by: rwestberg

! bots/merge/src/main/java/org/openjdk/skara/bots/merge/MergeBot.java
! bots/merge/src/main/java/org/openjdk/skara/bots/merge/MergeBotFactory.java
! bots/merge/src/test/java/org/openjdk/skara/bots/merge/MergeBotTests.java
! test/src/main/java/org/openjdk/skara/test/TestHost.java
! test/src/main/java/org/openjdk/skara/test/TestHostedRepository.java
! test/src/main/java/org/openjdk/skara/test/TestPullRequest.java
! vcs/src/main/java/org/openjdk/skara/vcs/Repository.java
! vcs/src/main/java/org/openjdk/skara/vcs/git/GitRepository.java
! vcs/src/main/java/org/openjdk/skara/vcs/hg/HgRepository.java
! vcs/src/test/java/org/openjdk/skara/vcs/RepositoryTests.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants