OpenTermsArchive / engine

Tracks contractual documents and exposes changes to the terms of online services.
https://opentermsarchive.org
European Union Public License 1.2
111 stars 30 forks source link

Shorten long GitHub comments to prevent errors #930

Closed martinratinaud closed 2 years ago

martinratinaud commented 2 years ago

Fixes #925.

I removed the link to the local contribution tool as it doubled the number of characters.

Thus I implemented the trimming of number of characters but I'm not sure it is necessary. And maybe we want the error to be not created instead of truncated, I'd like your thoughts on that.

MattiSG commented 2 years ago

maybe we want the error to be not created instead of truncated

My preference in terms of implementation would be that if the body size is still too long, we do not include a link to the contribution interface but the message is complete. This trim is indeed a bit brutal 😉

MattiSG commented 2 years ago

We could also base64-encode the contribution tool payload, I believe this is the way forward anyway as declarations get more complex and we will also hit the URL maximum size.

martinratinaud commented 2 years ago

@MattiSG I suggest to pur the base64 encoding in another PR as, as explained, I may try to passe the whole json encoded.

For the time being, I think should remove the trim and rename the PR as it is very unlikely for now that we reach this number of characters as we removed one url

MattiSG commented 2 years ago

Agreed! 👍