Only direct commits (1 parent) are assigned to contributors by including the files affected by the commit as contributions. A maintainer doing the hard work of merging PRs would get no credit, which is not right.
Assign all merged commits to the merging contributor.
This should work fine in small to medium size projects. Larger projects may have a maintainer who is not directly involved in writing code and relies on code reviews by others.
Adding merge commits may allow for cross-project matching of members (who worked with whom) without obtaining permission of all involved. It may be OK for public repos, but not for private subs.
Only direct commits (1 parent) are assigned to contributors by including the files affected by the commit as contributions. A maintainer doing the hard work of merging PRs would get no credit, which is not right.
Also there is a committer and an author and they are not always the same as in this example: https://github.com/openssl/openssl/commit/690a2b1fa2c8a7dba0be84dfc052d86b864bedc3
Solution 1
Assign all merged commits to the merging contributor.
This should work fine in small to medium size projects. Larger projects may have a maintainer who is not directly involved in writing code and relies on code reviews by others.