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

Gitea "unknown event type" (create and delete) #175

Open
posledov opened this issue Oct 13, 2024 · 2 comments
Open

Gitea "unknown event type" (create and delete) #175

posledov opened this issue Oct 13, 2024 · 2 comments

Comments

@posledov
Copy link

posledov commented Oct 13, 2024

Gitea version :: 1.22.3
webhook-go version :: 2.2.0

cat /etc/voxpupuli/webhook.yml

---
server:
  protected: false
  port: 8088
chatops:
  enabled: false
  service:
  channel:
  user:
  auth_token:
  server_uri:
r10k:
  command_path: "/opt/puppetlabs/puppet/bin/r10k"
  config_path: "/etc/puppetlabs/r10k/r10k.yaml"
  default_branch: production
  prefix:
  allow_uppercase: false
  verbose: true
  deploy_modules: true
  generate_types: false

Creating or deleting a branch leads to the following errors:

жов 13 18:43:52 puppet.local.lan webhook-go[111824]: time="2024-10-13T18:43:52+03:00" level=error msg="error parsing webhook: unknown event type delete"
жов 13 18:43:52 puppet.local.lan webhook-go[111824]: [GIN] 2024/10/13 - 18:43:52 | 500 |    6.828339ms |  192.168.1.13 | POST     "/api/v1/r10k/environment"
жов 13 18:44:51 puppet.local.lan webhook-go[111824]: time="2024-10-13T18:44:51+03:00" level=error msg="error parsing webhook: unknown event type create"
жов 13 18:44:51 puppet.local.lan webhook-go[111824]: [GIN] 2024/10/13 - 18:44:51 | 500 |     290.667µs |  192.168.1.13 | POST     "/api/v1/r10k/environment"
@posledov
Copy link
Author

webhook-go version :: 2.7.1 – the same problem

@dhollinger
Copy link
Member

dhollinger commented Nov 23, 2024

That is the current intended functionality. We only parse and react to push events at this time:

https://github.com/voxpupuli/webhook-go/blob/master/lib/parsers/gitea.go#L39-L41

Ensure that when you setup your webhook that gets sent to Webhook Go that you are only enabling the push event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants