Follow-up from "Pass configurable file size limit to gitlab-elasticsearch-indexer"

The following discussion from !84 (merged) should be addressed:

  • @mbergeron started a discussion: (+2 comments)

    Now that I see this function signature changed, I'm wondering if it we could add it directly to the Indexer type and be done with it? We could then remove parentID and the encoder parameter and that would cleanup the body quite a lot.

    If we don't want to refactor all the tests, another option would be to change the second parameter to be indexer *Indexer.

    func BuildCommit(c *git.Commit, c *Indexer) *Commit {  }

    That would require us to build Indexer in the tests but I think it would be cleaner and more semantic.