Target branch on filesystem?

I want to implement a merge-check where required approvers are determined based on Chromium style OWNERS files in the repository (

This requires the merge-check to have the target branch to be checked out on filesystem somewhere.

Is it possible?

Does the bitbucket server provide a working copy of the repo somewhere? If yes, can the merge-check switch it to the desired target branch any time?

Or my merge-check should implement that all - clone the repo itself, and checkout the desired branch there? Our repo is large, clonning at every invocation of the merge-check would be too expensive. Clone once and then reuse this clone for later invocations?

Also, if the merge-check modifies some global working copy, have several checks working in parallel would interfere with each other. How the server executes merge-check - is serialization guaranteed, or the server can invoke the merge-check serveral times in parallel?