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

Discord Webhook Links To API JSON #4656

Closed
2 of 7 tasks
atom0s opened this issue Aug 9, 2018 · 3 comments
Closed
2 of 7 tasks

Discord Webhook Links To API JSON #4656

atom0s opened this issue Aug 9, 2018 · 3 comments
Labels
Milestone

Comments

@atom0s
Copy link

atom0s commented Aug 9, 2018

  • Gitea version (or commit ref): a74426d
  • Git version: 2.17.1.windows.2
  • Operating system: Windows Server 2012 R2 Standard
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: N/A

Description

When a Discord web hook is sent to a Discord server, the output looks fine, however the main link is to the API call of the hook creation, instead of being to the actual thing. For example, if a web hook is called on an issue being created, Discord will display the main link title properly, but it will link to the API such as:
https://git.example.com/api/v1/repos/Example/Example/issues/55

Instead of to the actual issue link of:
https://git.example.com/Example/Example/issues/55

@atom0s
Copy link
Author

atom0s commented Aug 9, 2018

Side note, this does not happen with webhook callbacks that are responses to issues, just the initial callback for when the issue is first opened. The other callbacks so far appear to all work properly and give the correct links.

Edit - This is also affecting the issue close hook, the url for that one is wrong as well. Not too sure where to look in the Gitea source to check other hooks as well easier. I'm not familiar with Go or Gogs/Gitea's layout of code to know where to look since these are format generated strings.

@BaxAndrei
Copy link

BaxAndrei commented Jan 18, 2020

I encounter this problem at present, on gitea-1.11.0-rc1-linux-amd64 version

https://www.git.baxandrei.ro/api/v1/repos/EternumKings/FeedBack/issues/22
INSTEAD OF
https://www.git.baxandrei.ro/EternumKings/FeedBack/issues/22

@jolheiser
Copy link
Member

I encounter this problem at present, on gitea-1.11.0-rc1-linux-amd64 version

https://www.git.baxandrei.ro/api/v1/repos/EternumKings/FeedBack/issues/22
INSTEAD OF
https://www.git.baxandrei.ro/EternumKings/FeedBack/issues/22

This is fixed by #9661 and should be in 1.11.0-rc2 and the full release.

@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants