The user interface for an issue branch doesn't show, to users who can push code in it, a button to automatically apply a patch to the issue branch.
Supposing the issue branch doesn't exist, you can create it and apply the branch following these steps.
- Create the issue branch by clicking on the Create issue fork button that appears on the issue after the issue summary
- Follow the instructions given on Creating issue forks and merge requests » Cloning and committing code to an issue fork to set up the local repository for the issue branch
- Use
curl [patch-link] | git apply -
or wget -q -O - [patch-link] | git apply -
to apply the patch to the issue branch local repository
- Push the changes in the issue branch
[patch-link], for patches attached to issues on drupal.org is, for example, https://www.drupal.org/files/issues/2021-08-28/2557319-17.patch
, not https://www.drupal.org/files/2557319-17.patch
as Applying a patch in a feature branch seems to imply.
Posting a comment that explains you created the issue branch and applied the patch is fine. Users could find out the issue branch includes the patch, or assume you did that; commenting about what you did isn't wrong.
Looking at the issues for the project containing the drupal.org custom code, the ones for Gitlab integration, I don't see any issue for adding a button to apply a patch directly from the issue branch user interface, probably because it requires changing the Gitlab code, or it's not considered a necessary feature.