Compare commits

..

4 Commits

Author SHA1 Message Date
bb401f8252 Update README.md
Some checks failed
CI / test (push) Has been cancelled
2025-12-03 11:20:16 -08:00
78c0dcf2e5 Merge pull request 'Discord has a max message length of 2000, keep the PR title below that!' (#7) from max-message-length into main
Some checks are pending
CI / test (push) Waiting to run
Reviewed-on: #7
2025-12-03 18:55:32 +00:00
e46fb0dd7a Discord has a max message length of 2000, keep the PR title below that!
Some checks failed
CI / test (pull_request) Has been cancelled
2025-12-03 10:51:54 -08:00
d169c19e8a Merge pull request 'Good enough gitea/discord integration' (#6) from review-comments into main
Some checks failed
CI / test (push) Has been cancelled
Reviewed-on: #6
2025-11-13 22:55:24 +00:00
2 changed files with 9 additions and 2 deletions

View File

@ -32,4 +32,4 @@ import { something } from "@workshop/WHATEVER_YOU_WANT"
## How do I run the tests?
😂😂😂
😂😂😂😂😂

View File

@ -106,7 +106,7 @@ export class PRHandler {
static formatPrBody(pullRequest: Gitea.PullRequest, repositoryFullName: string): string {
const body = pullRequest.body || "_empty_"
return `
let message = `
> ### [${pullRequest.title}](<${pullRequest.html_url}>)
> **${repositoryFullName}**
>
@ -115,6 +115,13 @@ export class PRHandler {
.map((line) => `> ${line}`)
.join("\n")}
`
const maxMessageSize = 2000
const truncateMessage = `\n_message truncated. View full PR on Gitea_`
if (message.length < maxMessageSize) return message
return message.slice(0, maxMessageSize - 1 - truncateMessage.length) + truncateMessage
}
}