Skip to content

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

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

Closed
2 of 7 tasks
mxmehl opened this issue Sep 14, 2017 · 5 comments
Closed
2 of 7 tasks
Labels

Comments

@mxmehl
Copy link

mxmehl commented 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

@lafriks lafriks added this to the 1.x.x milestone Sep 14, 2017
@lunny
Copy link
Member

lunny commented Dec 12, 2017

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

@mxmehl
Copy link
Author

mxmehl commented 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.

@mjwwit
Copy link
Contributor

mjwwit commented Jan 29, 2018

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

@mxmehl
Copy link
Author

mxmehl commented 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

@lafriks
Copy link
Member

lafriks commented 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 lafriks closed this as completed Mar 2, 2018
@lafriks lafriks removed this from the 1.x.x milestone Mar 2, 2018
fsfe-system pushed a commit to fsfe/pmpc-website that referenced this issue Feb 23, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this issue Jan 23, 2025
- Backport of go-gitea#2518
- The content history table contains the content history of issues and
comments. For issues they are saved with an comment id of zero.
- If you want to check if the issue has an content history, it should
take into account that SQL has `comment_id = 0`, as it otherwise could
return incorrect results when for example the issue already has an
comment that has an content history.
- Fix the code of `HasIssueContentHistory` to take this into account, it
relied on XORM to generate the SQL from the non-default values of the
struct, this wouldn't generate the `comment_id = 0` SQL as `0` is the
default value of an integer.
- Remove an unncessary log (it's not the responsibility of `models`
code to do logging).
- Adds unit test.
- Resolves go-gitea#2513

(cherry picked from commit 331fa44)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants