Skip to content

Webhook bug: compare_url is incorrect for a new branch #9243

Open
@bill828

Description

@bill828
  • Gitea version (or commit ref): 1.9.3
  • Git version: 2.16.2
  • Operating system: CentOS 7.5
  • 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 I push new branch to the gitea server with more than one commits, a push event will be sent to the configured webhook.
However, the fields "before" and "compare_url" are incorrect.
Please see the attachment picture for the screenshot.

Reproduce steps:

  1. Create a new branch with command line "git checkout -b testbranch"
  2. Make some changes and commit.
  3. Push to remote with command line "git push --set-upstream origin testbranch".

Screenshots

Screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedissue/criticalThis issue should be fixed ASAP. If it is a PR, the PR should be merged ASAPtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions