Skip to content
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

Gitea "Release Created" Discord Webhook Links To API URL #27180

Closed
TheBrokenRail opened this issue Sep 21, 2023 · 0 comments · Fixed by #27182
Closed

Gitea "Release Created" Discord Webhook Links To API URL #27180

TheBrokenRail opened this issue Sep 21, 2023 · 0 comments · Fixed by #27182
Labels

Comments

@TheBrokenRail
Copy link
Contributor

Description

If you setup a Discord webhook and create a release, the message posted to Discord will link to the Gitea API, rather than the user-accessible link.

For instance, it will link to https://gitea.thebrokenrail.com/api/v1/repos/minecraft-pi-reborn/minecraft-pi-reborn/releases/482 instead of https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/releases/tag/2.4.9.

Reproduced on https://try.gitea.io as well: https://try.gitea.io/TheBrokenRail/Discord-Webhook-Bug/releases/tag/test

Gitea Version

1.20.4

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Screenshot from 2023-09-21 15-03-33
Screenshot from 2023-09-21 15-03-41

Git Version

2.40.1, Wire Protocol Version 2 Enabled

Operating System

Ubuntu 20.04

How are you running Gitea?

Using the Docker image.

Database

SQLite

silverwind pushed a commit that referenced this issue Sep 21, 2023
Backport #27182 by @jolheiser

Resolves #27180

`URL` points to the API URL, `HTMLURL` points to the web page.

Notably, however, for PRs they are the same URL. I switched them to use
HTMLURL to match the rest of the codebase terminology.

Co-authored-by: John Olheiser <[email protected]>
silverwind pushed a commit that referenced this issue Sep 21, 2023
Backport #27182 by @jolheiser

Resolves #27180

`URL` points to the API URL, `HTMLURL` points to the web page.

Notably, however, for PRs they are the same URL. I switched them to use
HTMLURL to match the rest of the codebase terminology.

Co-authored-by: John Olheiser <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this issue Jan 23, 2025
Backport go-gitea#27182 by @jolheiser

Resolves go-gitea#27180

`URL` points to the API URL, `HTMLURL` points to the web page.

Notably, however, for PRs they are the same URL. I switched them to use
HTMLURL to match the rest of the codebase terminology.

Co-authored-by: John Olheiser <[email protected]>
(cherry picked from commit d8583ed)
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.

1 participant