Enforce Check Run API limits

This commit is contained in:
Michal Dorner 2021-01-25 10:23:49 +01:00
parent fdd3509024
commit 7af0073fa3
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
5 changed files with 49 additions and 11 deletions

View file

@ -34,3 +34,11 @@ export function tableEscape(content: ToString): string {
export function fixEol(text?: string): string {
return text?.replace(/\r/g, '') ?? ''
}
export function ellipsis(text: string, maxLength: number): string {
if (text.length <= maxLength) {
return text
}
return text.substr(0, maxLength - 3) + '...'
}