Integrated: 2246: Check if the pull request is still open before issuing "integrate" automatically

Zhao Song zsong at openjdk.org
Mon Apr 29 22:04:41 UTC 2024


On Mon, 29 Apr 2024 21:14:24 GMT, Zhao Song <zsong at openjdk.org> wrote:

> IntegrateCommand has feature which is "/integrate auto". This command could make the pull request be automatically integrated when it is ready. But there is a bug.
> 
> Let's say we have a merge pull request, it has the auto label and it has the merge-conflict label(the pr has some merge conflicts need to be resolved manually).
> 1. A user pushes a commit to the source branch , it resolves the merge conflict
> 2. In CheckWorkItem#1, the new commit triggers CheckRun, so pull request bot removes merge-conflict label and added clean and ready
> 3. The user uses “Merge” button to merge the source branch into target branch in GitHub/GitLab
> 4. In the end of CheckWorkItem#1, pull request bot finds auto label and ready label, then issues “/integrate” command
> 5. When processing the /integrate command, pull request bot finds it’s not able to merge.
> 6. In another CheckWorkItem#2, nothing in the pull request has changed, so CheckRun will be skipped. But in the end of CheckWorkItem#2, pr bot will find auto label and ready label, and will issue another“/integrate” command
> 
> So the pull request bot will be stuck in a loop of step 4,5,6.
> 
> To resolve this issue, as Erik suggested, in step4, we should check if the pr is still open.

This pull request has now been integrated.

Changeset: d8a8a24d
Author:    Zhao Song <zsong at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/d8a8a24d35b1ee461e42364d8d6c2a1215a8ca8f
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

2246: Check if the pull request is still open before issuing "integrate" automatically

Reviewed-by: erikj

-------------

PR: https://git.openjdk.org/skara/pull/1644


More information about the skara-dev mailing list