Delete branch from merge PR will not trigger the post-receive hook #11977

Closed
opened 2025-11-02 09:53:26 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @cyrilfantin on GitHub (Nov 9, 2023).

Description

Hi,

I have a post-receive hook that does some actions when a branch is deleted.
It works fine if i delete the branch manually (git push --delete origin mybrancnh)
But nothing append when i merge a PR while the checkbox for Delete branch after merge

Is it normal ? how can i trigger a git hook on a delete branch from a merge PR ?

Thank you

Gitea Version

1.20.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

2.40

Operating System

Windows

How are you running Gitea?

Windows application

Database

PostgreSQL

Originally created by @cyrilfantin on GitHub (Nov 9, 2023). ### Description Hi, I have a post-receive hook that does some actions when a branch is deleted. It works fine if i delete the branch manually (git push --delete origin mybrancnh) But nothing append when i merge a PR while the checkbox for Delete branch after merge Is it normal ? how can i trigger a git hook on a delete branch from a merge PR ? Thank you ### Gitea Version 1.20.5 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.40 ### Operating System Windows ### How are you running Gitea? Windows application ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 09:53:26 -06:00
Author
Owner

@cyrilfantin commented on GitHub (Nov 9, 2023):

i think i have the anwser here https://github.com/go-gitea/gitea/issues/5309

Is there any way to tigger a jenkins job on delete branch from the gui ?

@cyrilfantin commented on GitHub (Nov 9, 2023): i think i have the anwser here https://github.com/go-gitea/gitea/issues/5309 Is there any way to tigger a jenkins job on delete branch from the gui ?
Author
Owner

@cyrilfantin commented on GitHub (Nov 9, 2023):

ok.. so it's a git branch -d. there is no githook trigger...
To trigger jenkins, i can use gitea webhook...

@cyrilfantin commented on GitHub (Nov 9, 2023): ok.. so it's a git branch -d. there is no githook trigger... To trigger jenkins, i can use gitea webhook...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11977