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

Mattermost Issue notification formatting broken #9195

Closed
2 of 7 tasks
cornelk opened this issue Nov 28, 2019 · 4 comments · Fixed by #9205 or #9378
Closed
2 of 7 tasks

Mattermost Issue notification formatting broken #9195

cornelk opened this issue Nov 28, 2019 · 4 comments · Fixed by #9205 or #9378
Labels
Milestone

Comments

@cornelk
Copy link
Contributor

cornelk commented Nov 28, 2019

  • Gitea version (or commit ref): 1.10.0
  • Git version:
  • Operating system:
  • 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:

Description

I integrated Gitea using a Webhook to Mattermost. When I create an issue in Gitea the following text gets posted on Mattermost:

[org/repo] Issue submitted by cornel

<https://host/org/test/pulls/1|#1 to do this>

The link can't be clicked as it's in text form.

Gitlab posts created issues as:

[[org/repo](https://host/org/repo)] Issue opened by Cornel (cornel)

which creates a link that can be clicked in Mattermost.

Screenshots

@lunny
Copy link
Member

lunny commented Nov 28, 2019

@cornelk Did you create a slack type webhook?

@lunny lunny added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Nov 28, 2019
@cornelk
Copy link
Contributor Author

cornelk commented Nov 28, 2019

@lunny yes, it's a Slack typed Webhook.

Looking at the code of https://github.com/go-gitea/gitea/blob/a966a0298ea1a545c383541ca4e72c61de1ed59e/modules/webhook/slack.go I see that new commit posts get the repoLink/branchLink but getSlackIssuesPayload() does not make use of p.Repo.HTMLURL which will not allow any posted message in there to be clicked. I can fix it if wanted.

@lunny
Copy link
Member

lunny commented Nov 29, 2019

@cornelk could you send a PR?

@lafriks lafriks added type/enhancement An improvement of existing functionality and removed issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels Nov 29, 2019
@lafriks lafriks added this to the 1.11.0 milestone Nov 29, 2019
@lafriks lafriks reopened this Nov 30, 2019
@cornelk
Copy link
Contributor Author

cornelk commented Dec 5, 2019

The issue got reopened, so I post the remaining problem with the formatting here:

69858467-06ce4b00-12cd-11ea-9c6d-5b075912b9f5

comment formatting is still broken

@lunny lunny added type/bug and removed type/enhancement An improvement of existing functionality labels Dec 14, 2019
@lunny lunny modified the milestones: 1.11.0, 1.10.2 Dec 18, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants