Webhook empty text #2824

Closed
opened 2025-11-02 04:49:51 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @FriedrichVonSchnitzel on GitHub (Jan 27, 2019).

  • Gitea version (or commit ref): a757920
  • Git version:
  • Operating system: Debian (docker)
  • 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:
Request
Response
200
Headers
Request URL: https://hooks.slack.com/services/.../.../..........
Request method: POST
Content-Type: application/json
X-GitHub-Delivery: 4ebaceaf-ecfd-4522-8873-bdff299d4244
X-GitHub-Event: issues
X-Gitea-Delivery: 4ebaceaf-ecfd-4522-8873-bdff299d4244
X-Gitea-Event: issues
X-Gogs-Delivery: 4ebaceaf-ecfd-4522-8873-bdff299d4244
X-Gogs-Event: issues
Content
{
  "channel": "#channel",
  "text": "",
  "username": "Gitea",
  "icon_url": "http://domain.com:3000/img/gitea-sm.png",
  "unfurl_links": 0,
  "link_names": 0,
  "attachments": [
    {
      "fallback": "",
      "color": "",
      "title": "",
      "text": ""
    }
  ]
}

Description

Webhooks to slack contain empty texts when notifying about milestones assigned to issues.
The bug occurs regardless of what is selected in the webhook settings (Trigger on: All events / Custom Events... - all selected). Example Webhook request from "Recent deliveries" provided above.
...

Screenshots

untitled

Originally created by @FriedrichVonSchnitzel on GitHub (Jan 27, 2019). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): a757920 - Git version: - Operating system: Debian (docker) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ``` 4ebaceaf-ecfd-4522-8873-bdff299d4244 2019-01-26 23:44:58 UTC Request Response 200 Headers Request URL: https://hooks.slack.com/services/.../.../.......... Request method: POST Content-Type: application/json X-GitHub-Delivery: 4ebaceaf-ecfd-4522-8873-bdff299d4244 X-GitHub-Event: issues X-Gitea-Delivery: 4ebaceaf-ecfd-4522-8873-bdff299d4244 X-Gitea-Event: issues X-Gogs-Delivery: 4ebaceaf-ecfd-4522-8873-bdff299d4244 X-Gogs-Event: issues Content { "channel": "#channel", "text": "", "username": "Gitea", "icon_url": "http://domain.com:3000/img/gitea-sm.png", "unfurl_links": 0, "link_names": 0, "attachments": [ { "fallback": "", "color": "", "title": "", "text": "" } ] } ``` ## Description Webhooks to slack contain empty texts when notifying about milestones assigned to issues. The bug occurs regardless of what is selected in the webhook settings (Trigger on: All events / Custom Events... - all selected). Example Webhook request from "Recent deliveries" provided above. ... ## Screenshots ![untitled](https://user-images.githubusercontent.com/16023334/51794265-35702680-21cf-11e9-8dfe-901ceae212ef.png) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@KubqoA commented on GitHub (Jan 27, 2019):

It's probably due to the fact, that the slack webhook implementation for issues doesn't check for api.HookIssueMilestoned and api.HookIssueDemilestoned. Maybe I could write you a PR.

@KubqoA commented on GitHub (Jan 27, 2019): It's probably due to the fact, that the [slack webhook implementation for issues](https://github.com/go-gitea/gitea/blob/5704b21165a28b72d502fdea6ba5c6fdf6b3b05e/models/webhook_slack.go#L134) doesn't check for `api.HookIssueMilestoned` and `api.HookIssueDemilestoned`. Maybe I could write you a PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2824