This was split from
BSERV-11472 where the suggestions were:
- It would be interesting to integrate Code Insights with the Jenkins Warnings plugin. I don't know whether anyone is working on that.
Jenkins has a feature that locally merges a pull request and then builds the result. I wonder if the annotations from that build could be usefully displayed by Bitbucket Server. It could result in more accurate annotations, but it would require the merge to be done in the same way on both servers, thus perhaps requiring the same version of Git.
- As of Bitbucket Server 7.0 this is not possible as Bitbucket Server will show the common ancestor diff, and not contain any merged lines
I see Bitbucket Server is already publishing refs with names like "refs/pull-requests/45/merge". If Jenkins (specifically the Bitbucket Branch Source plugin) used this instead of doing its own merge, it could then add the resulting Code Insights report to the automatic merge commit already known by Bitbucket Server. Alas, it seems Bitbucket Server 5.15.1 does not display Code Insights reports from such a commit in the open pull request that caused the automatic merge.
- As of Bitbucket Server 7.0 this is not possible as Bitbucket Server will show the common ancestor diff, and not contain any merged lines. Additionally, `refs/pull-requests/*` are not part of public API and could change at any time