jenkinsci / jenkinsci/github-branch-source-plugin
[JENKINS-67221] Jenkins not triggering the job for pull requests when github actions
- 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:
- This is a basic workflow to help you get started with Actions
name: Github-Webhook-Jenkins
- Controls when the workflow will run
on: [push, pull_request] - Triggers the workflow on push or pull request events but only for the Apple-API-Key branch
jobs:
- This workflow contains a single job called "build"
build: - 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
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:
- This is a basic workflow to help you get started with Actions
name: Github-Webhook-Jenkins
- Controls when the workflow will run
on: [push, pull_request]
- Triggers the workflow on push or pull request events but only for the Apple-API-Key branch
jobs:
- This workflow contains a single job called "build"
build:
- 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
Assessment
This issue has not been assessed yet.