Store commit metadata in Cycle Analytics tables
For the Plan phase, we currently get the first commit an issue was mentioned in by doing the following:
- Finding the MRs that closed that issue.
- Loading their serialised commits (in
st_commitsor their own table). - Comparing the commit's committed date to
first_mentioned_in_commit_at. - Using the commit metadata to build an entity.
We should really do this by figuring out what commit metadata we need, and storing that in its own table. (It could be commit_metadata if we think we'll need that elsewhere.) We should definitely store the SHA of the first_mentioned_in_commit, so that in future we can also consider getting the metadata from Gitaly.
/cc @jameslopez