RFR: 1450: Jcheck status message can be too big for Gitlab
Zhao Song
zsong at openjdk.org
Wed Oct 26 23:07:35 UTC 2022
SKARA-1450 describes the problem that the comment adding to a GitLab merge request can be too big to add and leads to fail.
To fix it, I add the function `limitBodySize()` to `addComment()` and `updateComment()` in `GitLabMergeRequest`, the function will check the size of the comment and the comment will be cropped if it is too big.
I also found that GitHub pull request might have the same problem, so I did the same change to `GitHubPullRequest`.
Currently, I set the comment max size to 20000, and I don't know whether it is fine. I think it could not be too small because the user wants to see more information and it should not be big because if it is too big, the page loading process will be slow when the user tries to open the pr.
[Maximum length for the comment body in GitHub PR](https://github.com/orgs/community/discussions/27190)
[My test in Playground](https://github.com/openjdk/playground/pull/99)
-------------
Commit messages:
- SKARA-1450
Changes: https://git.openjdk.org/skara/pull/1403/files
Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1403&range=00
Issue: https://bugs.openjdk.org/browse/SKARA-1450
Stats: 73 lines in 4 files changed: 73 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/skara/pull/1403.diff
Fetch: git fetch https://git.openjdk.org/skara pull/1403/head:pull/1403
PR: https://git.openjdk.org/skara/pull/1403
More information about the skara-dev
mailing list