Jenkins not triggering the job for pull requests when github actions

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Trying to trigger the jenkins build via github workflow action with github webhooks.

      on push events, branches are getting triggered whereas pull requests are not triggering. 

      I can see the payload at jenkins log with fail to process.

      Subscriber org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber failed to process SCMEvent{type=UPDATED, timestamp=Tue Oct 05 13:52:10 CDT 2021, payload={
      "action": "opened",
      "enterprise": {
      "avatar_url": "https://avatars.githubusercontent.com/b/7526?v=4",
      "created_at": "2021-06-09T14:45:02Z",

       

      github action workflow:

      1. This is a basic workflow to help you get started with Actions

      name: Github-Webhook-Jenkins

      1. Controls when the workflow will run
        on: [push, pull_request]
      2. Triggers the workflow on push or pull request events but only for the Apple-API-Key branch

      jobs:

      1. This workflow contains a single job called "build"
        build:
      2. The type of runner that the job will run on
        runs-on: webhooks
        steps:
      • name: Trigger Jenkins
        env:
        WEBHOOK_EVENT: ${{ toJson(github.event) }}
        run: |
        echo "$WEBHOOK_EVENT"
        curl --header "X-GitHub-Event: push" --header "Content-Type: application/json" -X POST --data "$WEBHOOK_EVENT" https://jenkins-server-url/github-webhook/
         

       

       

            Assignee:
            Unassigned
            Reporter:
            Harasai Kumar
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: