Add an option Check Changes From Bitbucket UI with default value false to keep compatibility with 1.24 version. Suggest to release it separately then.
Is there a way to tell if a change is the “code suggestion” vs. an edit initiated through the built-in editor?
The default for checking changes from the Bitbucket UI should be true – this is something that many people have complained about over the years, the built-in editor is used to circumvent checks. But maybe we could just ignore “code suggestions” by default.
Unfortunately no, I looked at repositoryHookRequest values in debugger and found no distinguishable difference.
Ok, let’s have enabled by default, though it will change existing behavior, incl. Apply suggestions functioning.
Something to try is having Yacc handle dry run requests. Currently they’re filtered out. Maybe if dry run requests are handled, Bitbucket will display an error before the code suggestion is applied.
In the case of PR’s, Bitbucket uses the dry run information to display the errors and block users from clicking “Merge”. Otherwise the errors are not displayed until the merge is performed.
dry-run filtering has been introduced after 1.25 release, so it’s not the cause.
I released version 1.26 with this option, branched off version 1.25
The documentation draft was published
We still need to cherry-pick this feature to master branch.
I’m leaving this ticket open even though the feature is released, because cherry-picking to master is a special case; there’s no “new” work on the ticket.
I suggest we do a full PR with testing when this feature is added to master, because master and 1.25 had diverged quite a bit.