fluxcd / notification-controller

The GitOps Toolkit event forwarder and notification dispatcher

Home Page:https://fluxcd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webhook receivers don't allow granular event selection on github

fishman opened this issue · comments

Describe the bug

if I create a github receiver, I can for example listen for the release events. However the release event on github triggers for Release created, edited, published, unpublished, or deleted.

Similarly it's impossible to trigger anything at the end of a github workflow. Since there is no way to limit the event on a completed workflow.

apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Receiver
metadata:
  name: github-receiver
  namespace: default
spec:
  type: github
  events:
    - "release"
  secretRef:
    name: webhook-token
  resources:
    - apiVersion: source.toolkit.fluxcd.io/v1beta1
      kind: GitRepository

Steps to reproduce

  1. Create a github-receiver as defined above
  2. add github webhook
  3. create a workflow which deletes a tag first and then does a release
  4. the reconcile happens before the release is create since the tag delete already triggers a reconcile

Expected behavior

Trigger the reconcile after successful release publish.

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

flux: v0.27.3

Flux check

N/A

Git provider

GitHub

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct