Tag push creates webhook with empty commits and head_commit #8292

Closed
opened 2025-11-02 08:01:17 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @DoLearnWhileAlive on GitHub (Dec 27, 2021).

Gitea Version

1.15.8

Git Version

2.33.1

Operating System

Windows Server 2016

How are you running Gitea?

based on gitea-1.15.8-windows-4.0-amd64.exe as Windows Service

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

Creating a new tag for a gitea repo creates a webhook with empty commits and head_commit. See example from gitea demo site:

{
  "ref": "refs/tags/v1.1.1",
  "before": "0000000000000000000000000000000000000000",
  "after": "3f150d39b92dd50cdd0248f5edea5767c2172584",
  "compare_url": "https://try.gitea.io/",
  "commits": [],
  "head_commit": null,
  "repository": {
  ...

I have an on-prem gitea instance connected with on-prem AppVeyor server. AppVeyor can't create new builds if commits and head_commit are empty, see also open issue on AppVeyor: appveyor/ci#3765

Screenshots

No response

Originally created by @DoLearnWhileAlive on GitHub (Dec 27, 2021). ### Gitea Version 1.15.8 ### Git Version 2.33.1 ### Operating System Windows Server 2016 ### How are you running Gitea? based on gitea-1.15.8-windows-4.0-amd64.exe as Windows Service ### Database SQLite ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Description Creating a new tag for a gitea repo creates a webhook with empty `commits` and `head_commit`. See example from gitea demo site: ``` { "ref": "refs/tags/v1.1.1", "before": "0000000000000000000000000000000000000000", "after": "3f150d39b92dd50cdd0248f5edea5767c2172584", "compare_url": "https://try.gitea.io/", "commits": [], "head_commit": null, "repository": { ... ``` I have an on-prem gitea instance connected with on-prem AppVeyor server. AppVeyor can't create new builds if `commits` and `head_commit` are empty, see also open issue on AppVeyor: appveyor/ci#3765 ### Screenshots _No response_
Author
Owner

@KN4CK3R commented on GitHub (Dec 31, 2021):

@DoLearnWhileAlive Does AppVeyor work now?

@KN4CK3R commented on GitHub (Dec 31, 2021): @DoLearnWhileAlive Does AppVeyor work now?
Author
Owner

@DoLearnWhileAlive commented on GitHub (Jan 3, 2022):

Just tested newest Gitea main build (1.16.0+dev-785-g496acbe9e) and AppVeyor is still not triggering a new build for a new tag. AppVeyor seems to expect both commits and head_commit to be defined.

@DoLearnWhileAlive commented on GitHub (Jan 3, 2022): Just tested newest Gitea main build (1.16.0+dev-785-g496acbe9e) and AppVeyor is still not triggering a new build for a new tag. AppVeyor seems to expect both `commits` and `head_commit` to be defined.
Author
Owner

@DoLearnWhileAlive commented on GitHub (Jan 3, 2022):

@KN4CK3R AppVeyor Server was updated with version 7.0.3134 to support head_commit in the webhook payload. With that change AppVeyor Server is creating a build for a Gitea tag webhook again. See also appveyor/ci#3765.
Thanks for fixing the Gitea part!

@DoLearnWhileAlive commented on GitHub (Jan 3, 2022): @KN4CK3R AppVeyor Server was updated with version 7.0.3134 to support `head_commit` in the webhook payload. With that change AppVeyor Server is creating a build for a Gitea tag webhook again. See also appveyor/ci#3765. Thanks for fixing the Gitea part!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8292