jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-67221] Jenkins not triggering the job for pull requests when github actions

Open
#1,382 0 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue jira-type:story priority:major resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

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/

     

 

 

---
Originally reported by harasai, imported from: Jenkins not triggering the job for pull requests when github actions


  • status: Open
  • priority: Major
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-02

Raw content of original issue

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/
     

 

 

environment

```
Jenkins 2.263.4

github-branch-source-plugin 2.9.9
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.