Patch drupal.org project (core/module/theme) with issue fork
It has been discussed already in the Opt-in to the Drupal.org Issue Forks and Merge Requests beta thread, see 3152637#comment-13820062.  As of now there is no straight way to integrate commits in composer patch work flow. You need to download the patch file manually by appending .patch to the merge request URL and copy it locally into your project to get it applied in the build process.
&quot;patches&quot;: {
    &quot;drupal/foobar&quot;: {
        &quot;3200808 - Lorem ipsum&quot;: &quot;./patches/3200808-3.patch&quot;
    }
}

You can get additional information on how to generate patch from the commit Id from the guide: Patch files for use with Composer.