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

Closed
opened 2025-11-02 05:50:55 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @bill828 on GitHub (Dec 3, 2019).

  • 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

Originally created by @bill828 on GitHub (Dec 3, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) 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): 1.9.3 - Git version: 2.16.2 - Operating system: CentOS 7.5 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] 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](https://user-images.githubusercontent.com/37794754/70041813-c76b6b80-15f8-11ea-8695-f7ba13cfd69e.png)
GiteaMirror added the issue/criticalissue/confirmedtype/bug labels 2025-11-02 05:50:55 -06:00
Author
Owner

@lunny commented on GitHub (Dec 3, 2019):

Which version did you use?

@lunny commented on GitHub (Dec 3, 2019): Which version did you use?
Author
Owner

@bill828 commented on GitHub (Dec 4, 2019):

I was using Gitea 1.9.3.

@bill828 commented on GitHub (Dec 4, 2019): I was using Gitea 1.9.3.
Author
Owner

@stale[bot] commented on GitHub (Feb 4, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 4, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4440