Pull requests wrongly marked as "Merged"?

0

We like to create pull requests early for new branches, meaning the developer who makes the branch will immediately create one or more pull requests to signal the intended destination branch(es) (for example both "dev" and "main" for hot-fixes). While the task is in progress, the related, pending pull request(s) are marked with status "Open"

But sometimes a pull request changes status to "Merged" even before the developer has had time to push any changes. However, when we click on the "Changes" tab, we see that nothing has actually been merged, and instead there is a message saying:

Differences between the source branch and the destination branch cannot be displayed for this pull request. The branch specified as the destination branch includes all the changes in the branch specified as the source branch as well as additional changes. You might have mixed up which branch should be the source, and which branch should be the destination.

We suspect this happens when another pull request is being merged, and that this triggers some kind of global check of all pull requests in the repo, to see if there is a diff, and if a pull request has no diff, AWS CodeCommit "helps" us clean up our "obsolete" PRs.

However, to us this is just counter-productive and confusing: Pull requests that nobody has merged are marked as merged, when the exact opposite is true. Had there been at least another status, like "Nothing to merge", then it would have been less mysterious, but still very counter-productive: Whenever this happens, we need to click on the "Changes" tab to make sure that this is actually a "Nothing to merge" status, and create a NEW pull request for anything that has been pushed to the branch after this unwanted "clean up".

Question: Is there a way to avoid early pull requests from being updated automatically like this, so that it will be entirely up to the developers to decide when a pull request should be marked as merged (i.e. have it marked as merged when it is actually merged, and only then)?

Thanks, and best regards, wab

wab
asked 2 years ago52 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions