attribution is not always correct for pull requests#21
Conversation
|
first I'm going to need to find common ancestor for the parents of the merge commit to determine where to stop traversing the graph for authors. Then I need to follow parents back to ancestor node, aggregating unique authors along the way. Note: merges can have multiple parents, so need to support more than just 2 parents. |
|
Hmm, finding common ancestor is no problem, but determining all authors might be tricky if the graph gets complex, because some paths might not lead back to the common ancestor. Maybe I can go about it another way. Example of such a graph: |
|
Notes from IRC: Note to self: So if I merge X into master then the first parent is that of the previous commit on master. If I merge master into X then the first parent is that of the previous commit on X. |
This is a huge performance enhancement for repos with lots of commits. Revisiting is totally unnecessary.
…correct-for-pull-requests attribution is not always correct for pull requests
this is because we don't have enough information in just the merge commit. We need to explore all the commits in the branch and give credit to all the authors who have a commit in the branch.
Relying on the user name from the commit message is especially invalid for organization accounts.
Note: Should be fine for
--data pullsIssue was discovered in #20 thanks.