Trigger jenkins job for all actions of pull request in github.

777 views
Skip to first unread message

Adharsha sri

unread,
Feb 14, 2022, 4:53:02 AM2/14/22
to jenkins...@googlegroups.com
Hi Team,

I am trying to trigger the jenkins job which will send slack notification to developers when there is a pull request in github.

I am using github pull request builder plugin in jenkins to achieve this and created a webhook in github and selected pull requests(pull request opened, closed, reopened, edited, assigned,review requested,  review request removed, labeled, unlabeled, synchronized, ready fir review, convertted to draft, locked or unlocked) in events.

I am able to trigger the jenkins job for only pullrequest open and reopened actions but not for remaining actions.

And also tried with poll scm, github hook trigger for gitscm polling and generic webhook trigger but not succeeded in achieving this.

Can anyone please help with this?

Thanks,
Adharsha.

Baptiste Mathus

unread,
Feb 14, 2022, 6:30:38 AM2/14/22
to jenkins...@googlegroups.com
Hi,

You want to use the GitHub branch source plugin. 

I don't think anyone should really use the "GitHub pull request builder plugin" anymore nowadays in 2022.

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJWGB6p6teEKQrm0SERJwMK1QZESjuvPNHGhtpN8rKCew%3DSvgA%40mail.gmail.com.

Adharsha sri

unread,
Feb 14, 2022, 7:29:56 AM2/14/22
to jenkins...@googlegroups.com
Thanks for the reply, is this plugin triggers the job when reviewers added in pull request in github.

Ivan Fernandez Calvo

unread,
Feb 14, 2022, 12:00:25 PM2/14/22
to Jenkins Users
Hi,

We use the Generic Webhook trigger plugin to trigger jobs on any kind of event from GitHub, it allows you to convert the payload of the message in variables and implements ways to filter the payload. We use to implement only one or two events per pipeline because the configuration tent to increase complexity with each new event to catch and filter, so we have a job to catch and filter the event and this one trigger the real job, in that way we can capture several events to trigger the same job and both part the event catcher and the pipeline are as simpers as posible. 

Adharsha sri

unread,
Feb 14, 2022, 12:12:55 PM2/14/22
to jenkins...@googlegroups.com
Thanks for the suggestion, but it is not working when a reviewer added to pull request.

kuisathaverat

unread,
Feb 15, 2022, 4:47:13 AM2/15/22
to jenkins...@googlegroups.com
It should work if your GitHub webhook is configured to send notification on review

Screenshot 2022-02-15 at 10.45.56.png

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/ax2uYjVZzFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJWGB6pWy0zQ%2BScRtSxBxqTXDjhMypC5NfHgxNtMhLxA_YQRMQ%40mail.gmail.com.


--
Reply all
Reply to author
Forward
0 new messages