Gitea doesn't send branch name to Drone via Webhook after merging Pull Request #1066

Closed
opened 2025-11-02 03:47:04 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @mxmehl on GitHub (Sep 14, 2017).

  • Gitea version (or commit ref): 5f4210a
  • Git version: 2.1.4
  • Operating system: Debian 8
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

I have Drone connected to Gitea for CIs. It works all fine except when I merge Pull Requests: Drone does build PRs but doesn't deploy them.

Example: This is a PR I worked with. With this commit I merged the PR with master. And this is the drone build which is just testing the PR before it has been accepted – it actually never deployed. The Drone file should be correct: .drone.yml

A comment on my SO question suggests that the Webhook Gitea sends lacks a branch name – it should be master to trigger the drone build. This is also visible in the API output.

Can it be that Gitea has a bug here?

Screenshot

My Gitea webhook setiing: https://i.imgur.com/sh8bwEv.jpg

Originally created by @mxmehl on GitHub (Sep 14, 2017). - Gitea version (or commit ref): 5f4210a - Git version: 2.1.4 - Operating system: Debian 8 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant ## Description I have Drone connected to Gitea for CIs. It works all fine except when I merge Pull Requests: Drone does build PRs but doesn't deploy them. Example: [This](https://git.fsfe.org/pmpc/website/pulls/107) is a PR I worked with. With [this](https://git.fsfe.org/pmpc/website/commit/e0ae45ae1c341723f5764ecc25479a1b63913e00) commit I merged the PR with master. And [this](https://drone.fsfe.org/pmpc/website/1274) is the drone build which is just testing the PR before it has been accepted – it actually never deployed. The Drone file should be correct: [.drone.yml](https://git.fsfe.org/pmpc/website/src/master/.drone.yml) A comment on [my SO question](https://stackoverflow.com/questions/46165230/build-doesnt-trigger-on-merged-pull-request) suggests that the Webhook Gitea sends lacks a branch name – it should be master to trigger the drone build. This is also visible in the [API output](https://drone.fsfe.org/api/repos/pmpc/website/builds/1274). Can it be that Gitea has a bug here? ## Screenshot My Gitea webhook setiing: https://i.imgur.com/sh8bwEv.jpg
GiteaMirror added the type/bug label 2025-11-02 03:47:04 -06:00
Author
Owner

@lunny commented on GitHub (Dec 12, 2017):

What's your Drone version and is this still a problem?

@lunny commented on GitHub (Dec 12, 2017): What's your Drone version and is this still a problem?
Author
Owner

@mxmehl commented on GitHub (Dec 12, 2017):

Yes, it's still an issue.

Drone version is 0.8.2. I just tested it with this PR. The following Drone build made syntax check etc (before the merge) but didn't deploy the updated master after the merge.

.drone.yml hasn't been changed and should catch updates to master.

@mxmehl commented on GitHub (Dec 12, 2017): Yes, it's still an issue. Drone version is 0.8.2. I just tested it with [this PR](https://git.fsfe.org/pmpc/website/pulls/207). The following [Drone build](https://drone.fsfe.org/pmpc/website/3681) made syntax check etc (before the merge) but didn't deploy the updated master after the merge. [.drone.yml](https://git.fsfe.org/pmpc/website/src/branch/master/.drone.yml) hasn't been changed and should catch updates to master.
Author
Owner

@mjwwit commented on GitHub (Jan 29, 2018):

I think I may have fixed this in drone/drone#2320

@mjwwit commented on GitHub (Jan 29, 2018): I think I may have fixed this in drone/drone#2320
Author
Owner

@mxmehl commented on GitHub (Mar 2, 2018):

Short update: The PR in drone has been merged but I cannot test it yet because Drone hasn't had a release yet and we only use stable versions in our organisation

@mxmehl commented on GitHub (Mar 2, 2018): Short update: The PR in drone has been merged but I cannot test it yet because Drone hasn't had a release yet and we only use stable versions in our organisation
Author
Owner

@lafriks commented on GitHub (Mar 2, 2018):

Closing this issue as fixed in drone. If issue persists even after drone upgrade to latest (with that fix) version please reopen

@lafriks commented on GitHub (Mar 2, 2018): Closing this issue as fixed in drone. If issue persists even after drone upgrade to latest (with that fix) version please reopen
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1066