Closed
Description
- Gitea version (or commit ref): 858197b
- Git version: N/A
- Operating system: N/A
- Database (use
[x]
): N/A- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Description
When I configure a webhook that receives all events, push events that remove a branch or branch removal of the branch through the UI do not trigger a webhook event:
Creation of a new branch results in events like:
X-Gitea-Event: create
{
"secret": "magic",
"sha": "2409990415d77f47ed5c4c775abda4ffa6aa5f11",
"ref": "branch",
"ref_type": "branch",
"repository": {
"id": 17,
"owner": {
...
and
X-Gitea-Event: push
{
"secret": "magic",
"ref": "refs/heads/branch",
"before": "0000000000000000000000000000000000000000",
"after": "2409990415d77f47ed5c4c775abda4ffa6aa5f11",
...
I would expect removal of the branch to trigger at least a webhook that looked something like:
X-Gitea-Event: push
{
"secret": "magic",
"ref": "refs/heads/branch",
"before": "2409990415d77f47ed5c4c775abda4ffa6aa5f11",
"after": "0000000000000000000000000000000000000000",
...
It is a somewhat separate concern the use of a magic value to indicate no ref, better would be to include the created and deleted booleans that GitHub does, but for my part the only concern I have is the lack of a push
event to catch branch removal.