Good catch, I'll look into it

Den torsdag den 23. november 2017 kl. 19.47.00 UTC+1 skrev Young Lee:
>
> Hi,
>
> I believe the new feature introduced in the Post Webhooks for Bitbucket 
> version 1.6.0 to "add support for ignoring branches" in advertently is 
> filtering all PullRequestEvents and it is not sent out to the registered 
> webhooks.
>
> Version 1.5.2 does send PullRequestEvents.
>
> The following changes in the PullRequestListener seems to have caused this 
> regression
>
>  if(event instanceof BitbucketPushEvent && 
> pushEventService.isValidEvent((BitbucketPushEvent) event, 
> webHookConfiguration))
>
>             {
>                 try (CloseableHttpResponse response = 
> httpClient.execute(post))
>                 {
>                     int statusCode = response.getStatusLine().getStatusCode();
>                     if (statusCode >= 400)
>                     {
>                         LOGGER.error(
>                                 "[repo: {}]| Something went wrong while 
> posting (response code:{}) the following body to webhook: [{}({})] \n{}",
>                                 repo,
>                                 statusCode,
>                                 webHookConfiguration.getTitle(),
>                                 webHookConfiguration.getURL(),
>                                 body);
>                     }
>                 }
>                 catch (IOException e)
>                 {
>                     LOGGER.error(
>                             "[repo: {}]| Something went wrong while posting 
> the following body to webhook: [{}({})] \n{}",
>                             repo,
>                             webHookConfiguration.getTitle(),
>                             webHookConfiguration.getURL(),
>                             body,
>                             e);
>                 }
>             }
>
>
>
> On Wednesday, November 22, 2017 at 11:02:11 AM UTC-8, Young Lee wrote:
>>
>> Hi,
>>
>> I been tracing the bitbucket branch source plugin thru the Intellij IDE 
>> debugger and am in need of help to understand why PR is not triggering 
>> builds.
>>
>> Here is my setup:
>>
>>    bitbucket server: version 4.14.11
>>    Post Webhooks for Bitbucket: v1.6.0
>>    bitbucket branch source plugin:  cloned from the github. (
>> https://github.com/jenkinsci/bitbucket-branch-source-plugin.git)
>>
>> Jenkins Job setup:
>>
>>    BitBucket Team/Project (see attached screenshot for configuration)
>>    
>>
>> I can see the PR events getting processed on Jenkins (below) when I 
>> update the PR branch, but the job is not getting scheduled.
>>
>> I really would appreciate some pointers on what to look for tracing the 
>> code.  I am guessing that the process method on line 661 inside the 
>> retrievePullRequest should be returning `true` to schedule a build.  When I 
>> trace the code that method seems to return false.
>>
>> [Wed Nov 22 10:22:18 PST 2017] Received 
>> com.cloudbees.jenkins.plugins.bitbucket.hooks.PushHookProcessor$1 UPDATED 
>> event from 127.0.0.1 ⇒ 
>> http://localhost:8080/jenkins/bitbucket-scmsource-hook/notify with timestamp 
>> Wed Nov 22 10:22:18 PST 2017
>> Connecting to http://localhost:7990 using admin/****** (admin)
>> Repository type: Git
>> Looking up OP/ovn2 for branches
>> Checking branch test_web_hook from OP/ovn2
>> Checking branch master from OP/ovn2
>>
>>   2 branches were processed
>> Looking up OP/ovn2 for pull requests
>> Checking PR-1 from OP/ovn2 and branch test_web_hook
>>
>>   1 pull requests were processed
>> [Wed Nov 22 10:24:12 PST 2017] 
>> com.cloudbees.jenkins.plugins.bitbucket.hooks.PushHookProcessor$1 UPDATED 
>> event from 127.0.0.1 ⇒ 
>> http://localhost:8080/jenkins/bitbucket-scmsource-hook/notify with timestamp 
>> Wed Nov 22 10:22:18 PST 2017 processed in 1 min 53 sec
>>
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ce88bf2b-14dd-4108-b2d7-72d531144f38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to