为github合并触发开源jenkins作业

为github合并触发开源jenkins作业,jenkins,github,githooks,pull-request,jenkins-github-plugin,Jenkins,Github,Githooks,Pull Request,Jenkins Github Plugin,这是我们的工具集: jenkins:AWS服务器上运行的开源jenkins-2.107.2 Github:2.13.3版本 要求: 我们需要创建一个GitHub钩子,如果有人合并分支(创建pull请求并合并它),那么它应该触发Jenkins作业。我们不使用多分支管道,我们只使用管道作业,即使用JenkinsFile来运行作业 因此,我在github webhooks中启用了“PullRequestEvent”。然后,我在Jenkins作业中为该特定作业启用了scm轮询。但是,问题是该作业将被触发

这是我们的工具集: jenkins:AWS服务器上运行的开源jenkins-2.107.2 Github:2.13.3版本

要求: 我们需要创建一个GitHub钩子,如果有人合并分支(创建pull请求并合并它),那么它应该触发Jenkins作业。我们不使用多分支管道,我们只使用管道作业,即使用JenkinsFile来运行作业

因此,我在github webhooks中启用了“PullRequestEvent”。然后,我在Jenkins作业中为该特定作业启用了scm轮询。但是,问题是该作业将被触发,以提交到xyz分支,并且如果我们合并拉请求。但是,预期的行为是,只应为合并触发作业

polling log :
This page captures the polling log that triggered this build.
Started on Jul 17, 2018 2:04:00 PM
Using strategy: Default
[poll] Last Built Revision: Revision xyzz (origin/development)
> /app/digital/tools/git/bin/git --version # timeout=10
using GIT_ASKPASS to set credentials Githubread id generated on 20th Jan   2017
> /app/digital/tools/git/bin/git ls-remote -h https://github.xyz.net /abc/Test-SourceCode-Jenkins # timeout=10
Found 3 remote heads on https://github.xyz.net/abc/Test-SourceCode-Jenkins
[poll] Latest remote head revision on refs/heads/development is: xyzz
Done. Took 1.8 sec
Changes found
詹金斯配置:


有人能回复吗?有人对上述问题有想法吗?