Hi,
We are looking for a way to trigger a job when a pull request is being merged into master.
We would like to ignore all the other events, particularly pushing code directly to master.
We tried to configure the job as follows:
+refs/pull/*:refs/remotes/origin/pr/*
refs/heads/master
GitHub hook trigger for GITScm polling
The configuration above triggers the job for any merge to master.
Is there anybody that knows how to configure a job in such a way?
GitHub plugin - 1.25.1
Git plugin – 3.0.1
Git client plugin – 2.2.1
Jenkins ver. 2.32.1
--
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/fcaaee97-6d67-41ab-97bb-70bba73003b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Github does not differentiate between a merge or a push. You should disallow direct push to master by making master a protected branch.
This way only Pull Request is allowed to be merged to master.
--