Skip to content

Truncate option for Discord #32278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
echodreamz opened this issue Oct 16, 2024 · 10 comments
Open

Truncate option for Discord #32278

echodreamz opened this issue Oct 16, 2024 · 10 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@echodreamz
Copy link

Feature Description

Would it be possible to add a setting that overrides the truncating of Discord webhook notifications? Previously, Gitea would push the entire commit message, now it cuts off at 50 characters like Github does, one of the reasons we stuck with Gitea is because the webhook notifications included the entire commit message.

Adding a setting (default to 50 characters) to enable/disable or extend the characters count I think would be a good middle ground to allow the previous behavior but also allow conforming to Github.

Screenshots

No response

@echodreamz echodreamz added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Oct 16, 2024
@yp05327
Copy link
Contributor

yp05327 commented Oct 17, 2024

@kemzeb
Can you follow this?

@kemzeb
Copy link
Member

kemzeb commented Oct 17, 2024

Interesting, I never thought that there would be an interest in keeping the previous behavior. I think it would be fine to make this configurable, I'm just not sure how that would look. I'm also trying to ponder any potential problems in the future if we would introduce this setting. This would be a specific configuration, where it's:

  • Just for Discord webhooks
  • Just for push events

We also need to consider the scope of the setting, should it be:

  • Instance-wide?
  • Organization/repository-wide?

The easiest would be to define some instance-wide setting, but I'm unsure if this is the best option.

I do know that the webhook table does have a meta column and I originally thought that we could throw a simple flag in the table and in the Discord webhook creation form that would toggle truncation on/off. I then realized that this is actually used in order for us to communicate to Discord properly, so this won't work. Open to other ideas.

@echodreamz
Copy link
Author

I would think an option on the webhook when creating it? Though, I'd assume this would require a new database column on the webhook table, so that might be a bit much?

For me, specifically, an instance-wide setting would be all I need, but that is just 1 use case.

@KonsXeni
Copy link

Wow, this post is fresh.

We concur in bringing this as a feature. It's very convenient for our small team.

I can't comment on bigger teams but I have a feeling it can still be beneficial, depending on the production structure.

It provides the much-needed awareness, and depending on your role the information can mean something different. Remote working environment.

@kemzeb
Copy link
Member

kemzeb commented Oct 22, 2024

Been busy but I'll see what I can do when I get the time. I may choose the "add new db column to webhook table" option for now as a way of storing webhook configurations, but I also want to check out the other forges to see if they implement something like this and if I can find a better approach.

@echodreamz
Copy link
Author

Awesome! Looking forward to getting full discord notifications back :)

@echodreamz
Copy link
Author

Has there been any traction on this?

@kemzeb
Copy link
Member

kemzeb commented Nov 20, 2024

I've been quite busy and wanted to do some other things in my backlog before setting my sights on this. I will get to working on this as soon as I can, but welcome anyone to open a PR if they can do it sooner :)

@IceTank
Copy link

IceTank commented Feb 21, 2025

Is this still being worked on? Having a way to display the entire commit message in the webhook like it was before would be very useful.

@echodreamz
Copy link
Author

Agreed... This has really been a major loss to us. Enough to where we've disabled automatic updates to prevent future issues like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

5 participants