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

include head_commit in push webhooks if tag #5266

Closed
bradrydzewski opened this issue Nov 3, 2018 · 2 comments · Fixed by #16282
Closed

include head_commit in push webhooks if tag #5266

bradrydzewski opened this issue Nov 3, 2018 · 2 comments · Fixed by #16282
Labels
good first issue Likely to be an easy fix hacktoberfest type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@bradrydzewski
Copy link

bradrydzewski commented Nov 3, 2018

It would be great if Gitea could include the head_commit in the push webhook if the object is a tag. For reference this is what GitHub sends in the push hook if the object is a tag:

{
  "ref": "refs/tags/v0.0.1",
  "before": "0000000000000000000000000000000000000000",
  "after": "d2b75aa7797ec26b088fa2dd527e9d2c052fcedd",
  "created": true,
  "deleted": false,
  "forced": false,
  "base_ref": "refs/heads/master",
  "compare": "https://github.com/bradrydzewski/drone-test-go/compare/v0.0.1",
  "commits": [

  ],
  "head_commit": {
    "id": "d2b75aa7797ec26b088fa2dd527e9d2c052fcedd",
    "tree_id": "f38d6b02c9ee18de68e5e6682721a22df4c9a29d",
    "distinct": true,
    "message": "Update .drone.yml",
    "timestamp": "2018-06-19T19:03:12-07:00",
    "url": "https://github.com/bradrydzewski/drone-test-go/commit/d2b75aa7797ec26b088fa2dd527e9d2c052fcedd",
    "author": {
      "name": "Brad Rydzewski",
      "email": "[email protected]",
      "username": "bradrydzewski"
    },
    "committer": {
      "name": "GitHub",
      "email": "[email protected]",
      "username": "web-flow"
    },
    "added": [

    ],
    "removed": [

    ],
    "modified": [
      ".drone.yml"
    ]
  }
}

For my specific use case, I would like to display the commit details (email address, commit message, etc) in the user interface in Drone. Currently these fields are blank. Thanks!

@lunny lunny added type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Nov 4, 2018
@tobybellwood
Copy link

more broadly, the head_commit is never populated - even for pushes. I've had a quick look at the attached PR, but it seems that Gitea has refactored some of their models since it was created and now is probably not applicable.

We do the same for Lagoon using the head_commit to display the full URL for the after commit on a push or create, and would like to be able to use our GitHub:x handlers instead of creating new ones just for Gitea

@zeripath
Copy link
Contributor

This would very likely be a very a simple pr.

@zeripath zeripath added the good first issue Likely to be an easy fix label Sep 12, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Likely to be an easy fix hacktoberfest type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
5 participants