Skip to content

Gitea sends discord webhook for edited release draft #27157

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

Closed
2 of 4 tasks
Andre601 opened this issue Sep 20, 2023 · 1 comment · Fixed by #29008
Closed
2 of 4 tasks

Gitea sends discord webhook for edited release draft #27157

Andre601 opened this issue Sep 20, 2023 · 1 comment · Fixed by #29008
Labels
Milestone

Comments

@Andre601
Copy link

Andre601 commented Sep 20, 2023

Description

When you set up a discord-type webhook where you chose your events and selected Release will Gitea not send a Webhook when you save a new release as draft. This is fine and something I would expect as you may not want to publish new info too early to everyone.

However, if you edit said draft and again save it as such, therefore editing the draft, will Gitea send a webhook with the edit notification, which isn't really an optimal thing to do here.

Note that I have encountered this behaviour on a forgejo instance and I cannot test it within try.gitea.io due to it not allowing to make release drafts... So testing it yourself if you have the permission - or granting me the permission (Username is Andre601) to make drafts - is recommended.

Steps for possible reproduction:

  1. Create a Discord Webhook and copy URL
  2. Create a new Webhook on your Repository by selecting "Discord" as the webhook type
  3. Paste the URL into the URL field
  4. Select "Custom Events" followed by "Release"
  5. Go to releases tab
  6. Draft a new release and save it as a draft
  7. Edit the draft and save it as draft again
  8. Notice the webhook sending despite the edited release still being a draft

I would like to take the oportunity to also propose changes to the webhook system.
The way it is right now is flexible, yet rigit.
Flexible, because you can define your own selection of events to send a webhook for, but rigit because the selectable events group common types together, without any way of filtering them out...

As an example "Release" includes creation, deletion and edits of releases, without having any option to only have creation and edits f.e.

It should be considered to allow more fine-grained selections. Maybe by having the types as sub-lists of the event itself to select, where selecting the main/parent event would auto-select all the sub-list items...

A quick mockup using GitHub checkbox lists:

  • Release
    • Create
    • Edit
    • Delete

I can create a separate issue for this as a feature request if that is wanted.

Gitea Version

1.20.3+0-38-g0e33ecb13

Can you reproduce the bug on the Gitea demo site?

No (Not possible to test on that instance)

Log Gist

No response

Screenshots

Webhook message of the edited release draft:
grafik

The release in question, clearly marked as Draft:
grafik

Git Version

Operating System

How are you running Gitea?

I do not self-host/run it, but use codeberg.org for this.
As mentioned is the instance actually using forgejo, but given its soft-fork nature and currently not having any major differences from Gitea, I have strong beliefs that this bug exists within Gitea itself.

Database

None

Copy link

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this issue Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants