I am using gitflow with BitBucket Cloud (and Sourcetree). Normally, when I create a pull request, I then use the Sourcetree gitflow actions to finish the feature and it will do a merge commit back to the develop branch. BitBucket notices that the feature branch for the PR has been merged, and automatically closes the PR, which is all good.
However, if I don't want merge commits cluttering up my history and want to do a rebase instead, then BitBucket does not notice that the PR can be closed automatically. Instead, it shows that there are no files affected in the PR (once the rebase has been completed successfully), leaving me no option but to decline the PR. This then shows up in JIRA and makes people wonder why the feature was completed without a successful PR.
Am I missing something, or is it not possible for BitBucket to detect that the pull request can be closed automatically?