Skip to content

Webhook responses are not displayed in the webhook history #3965

@sm-Fifteen

Description

@sm-Fifteen
  • Gitea version (or commit ref): 1.4.0
  • Git version: 2.7.1.windows.2
  • Operating system: Windows
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (Page can't be made public)
    • No
    • Not relevant
  • Log gist:
    N/A

Description

The return value of webhooks can't be assessed in the web UI alone beyond whether they succeeded or not, since the return status is always reported to be N/A, as is the response body. This is not due to the response not being visible to Gitea, as it gets logged in the database.

Based on what I've seen, I'm guessing the model's content for HookTasks pulled from the database doesn't get updated properly to match the content fetched from the database (which would explain why the fields are always represented in the view as if they were empty), but my experience with go is very limited, so I could very well be wrong on that.

Screenshots

Here is the webhook configuration for the repository I was using on try.gitea.io. The two test runs were performed on https://jsonplaceholder.typicode.com/posts (which supports POST and should return a long list of placeholder data) and https://jsonplaceholder.typicode.com/posts/1 (which does not support POST and returns 404 with an empty JSON object). As expected, one succeeded and one failed, but the Response for both is listed as N/A with status N/A.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions