-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Description
Feature Description
gitea/services/webhook/discord.go
Lines 164 to 177 in 8cea1ae
| for i, commit := range p.Commits { | |
| // limit the commit message display to just the summary, otherwise it would be hard to read | |
| message := strings.TrimRight(strings.SplitN(commit.Message, "\n", 2)[0], "\r") | |
| // a limit of 50 is set because GitHub does the same | |
| if utf8.RuneCountInString(message) > 50 { | |
| message = fmt.Sprintf("%.47s...", message) | |
| } | |
| text += fmt.Sprintf("[%s](%s) %s - %s", commit.ID[:7], commit.URL, message, commit.Author.Name) | |
| // add linebreak to each commit but the last | |
| if i < len(p.Commits)-1 { | |
| text += "\n" | |
| } | |
| } |
My commit messages sometimes have multi-paragraph summaries, and I'd like the full messages to be sent to the discord servers. This option may be configured during webhook creation, or elsewhere, idk.
I've highlighted the discord webhook code, but I'm assuming this could be useful for all the other supported platforms too. I know it's probably not as trivial as it looks, but it'd be an awesome feature, since the repo is private but I like sharing the progress updates to my community.
I'd try doing this myself for a PR, but I don't know Go, and I'm not in a good state to learn it right now. P.S. Thanks for this awesome tool.
Screenshots
No response
Metadata
Metadata
Assignees
Labels
type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.