Edited commit message cannot be accessed from Runner shell
Description
GitLab makes it possible for users to change both single and squash commits in a Merge Request. Users are often keen on making sure commit messages adhere to specific guidelines, often using linting tools in combination with CI/CD scripts for this purpose.
Currently, there's no way to access the altered commit messages from a pipeline perspective, if they have been altered via the UI's "Modify merge commit" or "Modify commit messages" (the latter when squashing commits) links on an MR.
Proposal
When Merged results pipelines and Merge Trains are enabled, an "extra" pipeline is scheduled to run against the results of the source and target branches merged together.
The modified commit messages should be available either in the form of a CI variable, or be extractable from the git repository itself.