Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-9405

[tkn pac] cel fails to parse GitLab gosmee: valid X-Gitlab-Event errors as unknown

XMLWordPrintable

    • Ranked Issues

      Description of problem:

      The documentation states that tkn pac cel supports headers from gosmee --save scripts. With a valid X-Gitlab-Event: Merge Request Hook, the provider should be detected as GitLab and event should resolve to "pull_request"

      Prerequisites (if any, like setup, operators/versions):

      tkn-pac 0.39.2

      Steps to Reproduce

      #!/usr/bin/env bash
      curl -X POST "http://localhost:8080/" \
        -H "Content-Type: application/json" \
        -H "User-Agent: GitLab/18.7.0-pre" \
        -H "X-Gitlab-Event: Merge Request Hook" \
        -H "X-Gitlab-Instance: https://gitlab.com" \
        -H "X-Gitlab-Token: REDACTED" \
        -d @gitlab_mr.json
       

       

       echo 'event == "pull_request"' | tkn pac cel -p gitlab \
        -b gitlab-mr.json \
        -H gosmee.sh

      Actual results:

      Error: unknown X-Gitlab-Event

      Expected results:

      true

              Unassigned Unassigned
              rhn-support-sselvan Sri Vignesh Selvan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: