@gracinet during interviews it was mentioned that, at some point, there was code (maybe still ?) to match GitHub pull requests with Heptapod merge requests. Does that ring a bell? If not I can try to be more specific: this is a very fuzzy question
Is the code (even if not used anymore) in a public place for browsing? It may be a good source of inspiration. Specially since you presumably identified a few corner cases that are would otherwise require work to figure out.