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

Adding a comment in review panics #11940

Closed
2 of 7 tasks
cornelk opened this issue Jun 17, 2020 · 2 comments · Fixed by #12046
Closed
2 of 7 tasks

Adding a comment in review panics #11940

cornelk opened this issue Jun 17, 2020 · 2 comments · Fixed by #12046
Labels
Milestone

Comments

@cornelk
Copy link
Contributor

cornelk commented 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)
@lunny lunny added the type/bug label Jun 18, 2020
@lunny
Copy link
Member

lunny commented Jun 18, 2020

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

@cornelk
Copy link
Contributor Author

cornelk commented Jun 24, 2020

I am working on a fix for this.

@lunny lunny added this to the 1.12.2 milestone Jun 25, 2020
@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
Development

Successfully merging a pull request may close this issue.

2 participants