Contrary to the way matrix is developed and sold today, the protocol allows for way way more than chat.
There is talk at the moment about adding federation to got forges: let instances talk together, accounts cross post, etc. It's centered around instances and they have specific addons to interact. Matrix can make it work because it takes a radically orthogonal approach: rooms are front and center. Rooms can be joined by anyone anywhere. Rooms are replicated. The homeserver is a technical detail in service of the functional source of truth: the Room, an append-only log of arbitrary json. There is also a key-value store for arbitrary blobs to store binary stuff.
In the context of forges, a repo can be a room: events for issues/replies, events for merge requests, events for CI/CD blobs for actual code storage and releases, ... Anyone can join and push events, with the correct rights of course, so you have branches included. Everything is replicated. No one cares what instance you are from.
I seriously invite you to consider the semantically model of Matrix, it's pretty good.