Your comments

I have similar need for slightly different use-case: we use rebase merging into master on Github and we don't do squashing of pull requests. Therefore each pull-request adds a sequence of many commits to master. All these share the author and jira ticket ID (our commit message start with ticket ID).

So it would be great to have possibility to collapse commits either by pull-request (if this info is available) or by author+message pattern.