Adding a comment in review panics #5569

Closed
opened 2025-11-02 06:29:13 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @cornelk on GitHub (Jun 17, 2020).

  • Gitea version (or commit ref): v1.12.0-rc2
  • Git version:
  • Operating system: Linux
  • 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

When using the Add Single Comment button in review view:

2020/06/18 00:16:52 ...les/context/panic.go:35:1() [E] PANIC:: interface conversion: structs.Payloader is *structs.PullRequestPayload, not *structs.IssueCommentPayload
        /usr/local/go/src/runtime/iface.go:260 (0x411bfa)
        /usr/local/go/src/runtime/iface.go:270 (0x411b5f)
        /go/src/code.gitea.io/gitea/modules/webhook/slack.go:324 (0x16da5ce)
        /go/src/code.gitea.io/gitea/modules/webhook/webhook.go:93 (0x16ddbea)
        /go/src/code.gitea.io/gitea/modules/webhook/webhook.go:201 (0x16de74a)
        /go/src/code.gitea.io/gitea/modules/webhook/webhook.go:165 (0x16de366)
        /go/src/code.gitea.io/gitea/modules/notification/webhook/webhook.go:672 (0x16efc72)
        /go/src/code.gitea.io/gitea/modules/notification/notification.go:86 (0x16f1f17)
        /go/src/code.gitea.io/gitea/services/pull/review.go:192 (0x178564b)
        /go/src/code.gitea.io/gitea/services/pull/review.go:97 (0x178441b)
        /go/src/code.gitea.io/gitea/routers/repo/pull_review.go:38 (0x19f51b9)
Originally created by @cornelk on GitHub (Jun 17, 2020). - Gitea version (or commit ref): v1.12.0-rc2 - Git version: - Operating system: Linux - Database (use `[x]`): - [X] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description When using the `Add Single Comment` button in review view: ``` 2020/06/18 00:16:52 ...les/context/panic.go:35:1() [E] PANIC:: interface conversion: structs.Payloader is *structs.PullRequestPayload, not *structs.IssueCommentPayload /usr/local/go/src/runtime/iface.go:260 (0x411bfa) /usr/local/go/src/runtime/iface.go:270 (0x411b5f) /go/src/code.gitea.io/gitea/modules/webhook/slack.go:324 (0x16da5ce) /go/src/code.gitea.io/gitea/modules/webhook/webhook.go:93 (0x16ddbea) /go/src/code.gitea.io/gitea/modules/webhook/webhook.go:201 (0x16de74a) /go/src/code.gitea.io/gitea/modules/webhook/webhook.go:165 (0x16de366) /go/src/code.gitea.io/gitea/modules/notification/webhook/webhook.go:672 (0x16efc72) /go/src/code.gitea.io/gitea/modules/notification/notification.go:86 (0x16f1f17) /go/src/code.gitea.io/gitea/services/pull/review.go:192 (0x178564b) /go/src/code.gitea.io/gitea/services/pull/review.go:97 (0x178441b) /go/src/code.gitea.io/gitea/routers/repo/pull_review.go:38 (0x19f51b9) ```
GiteaMirror added the type/bug label 2025-11-02 06:29:13 -06:00
Author
Owner

@lunny commented on GitHub (Jun 18, 2020):

That's because for HookEventPullRequestComment event, some places use IssueCommentPayload and others use PullRequestPayload

@lunny commented on GitHub (Jun 18, 2020): That's because for `HookEventPullRequestComment` event, some places use `IssueCommentPayload` and others use `PullRequestPayload`
Author
Owner

@cornelk commented on GitHub (Jun 24, 2020):

I am working on a fix for this.

@cornelk commented on GitHub (Jun 24, 2020): I am working on a fix for this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5569