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.


From: <jenkinsci-users@googlegroups.com> on behalf of Isaac Eliassi 
<isaac.eli...@gmail.com>
Reply-To: "jenkinsci-users@googlegroups.com" <jenkinsci-users@googlegroups.com>
Date: Sunday, January 22, 2017 at 8:46 AM
To: Jenkins Users <jenkinsci-users@googlegroups.com>
Subject: Trigger job upon pull request merg into master.

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:

  1.  Source Code Management

     *   Refspec (under advance)
+refs/pull/*:refs/remotes/origin/pr/*

     *   Branch Specifier
refs/heads/master

  1.  Build Triggers
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-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@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<https://groups.google.com/d/msgid/jenkinsci-users/fcaaee97-6d67-41ab-97bb-70bba73003b1%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/78AD8A1F-3537-4333-8B75-B2CD09877D10%40cisco.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to