Teams webhook (extra/gitdiff-msteams.sh) - max message size problem

Hi

We use:
Oxidized-web v.0.14.0, Oxidized v.0.30.1

Sometimes the diffs get very large and hit the max for teams webhooks 1

I am sadly not proefficient in bash, but would like to do a tweak with one of two solution:
a: cut of the git output before the max message size and add a message like “Commit output truncated to fit the 28KB limit.”
b: create and send multiple messages each under 28KB

I’m writing here in the hope that somebody else might have made such modifications in their environment.

1: Create an Incoming Webhook - Teams | Microsoft Learn

I will do a pull request to get this into oxidized, but if it does not get accepted, i post here for others to use.
I created a solution, and spiced it up with a link to our internal github to view the diff: