Ability to inspect squash commit message

  • What are you seeing, and how does it differ from what you expect to see?

In our company, we started using squash commit in our merge requests. Before, we had a pipeline that checked for validity of commit messages. (length & containing issue number). Now using squash commits on Git lab merge requests, we are able to provide custom commit message, but we cannot monitor it.

  • What version are you on (Hint: /help) ? and are you using self-managed or gitlab.com?

Self-Managed, Community-Edition 13.0.3

// =============================================

I believe it helps if there was an ENVIRONMENT_VARIABLE set for custom squash commit message that user has entered , so we can inspect it and check it in our CI/CD process.

// ======================================================

It would be helpful too, if there was an option to enforce squash commit message and description be taken from merge request’s title and description.

I have the exact same use case.

I want to lint a commit message during the squash commit that precedes a merge into master - only. I believe there is no possible way of me determining this right now and so I cannot do this.

Please can you acknowledge this ask, provide a response and an ETA?

I suggest opening an issue here: Issues · GitLab.org / GitLab · GitLab

We are just community members, and writing here about something you wish to be integrated into Gitlab isn’t enough. The devs look at issues on the Gitlab repository, and anyone wanting a feature can vote on it, the more interest, the quicker it’s most likely to be integrated.

For anyone who wants something like this to be implemented, feel free to provide your use case in this GitLab issue: Ability to enforce squash commit message format (#342949) · Issues · GitLab.org / GitLab · GitLab

1 Like