samson icon indicating copy to clipboard operation
samson copied to clipboard

Github pull requests not triggering

Open adinhodovic opened this issue 6 years ago • 4 comments

Deploys are not triggered when opening or synchronizing a PR. Tried opening a pr to master and updating it, guessing it would trigger with the 'any branch' setting. Docker tag v2505.

Log:

INFO: Request is not supposed to trigger a deploy

Webhook mapping:

Any branch → dev stage for: Any pull request

Partial Payload (can post full if needed):

{
  "payload": "{\"action\":\"opened\",\"number\":2,\"pull_request\":{\"url\"}}
}

Same thing for synchronize:

Webhook mapping:

Any branch → dev stage for: Any pull request

Payload:

"payload": "{\"action\":\"synchronize\",\"number\":9,\"pull_request\":{\"url\"}}

Log:

INFO: Request is not supposed to trigger a deploy

Am I missing something?

adinhodovic avatar Nov 15 '18 01:11 adinhodovic

code looks like it should work VALID_ACTIONS = ['opened', 'edited', 'synchronize'].freeze and then return false if data['state'] != 'open' || !VALID_ACTIONS.include?(action) ... I think the issue is WEBHOOK_FILTER = /(^|\s)\[samson review\]($|\s)/i ... try adding [samson review] to the PR and see what happens

grosser avatar Nov 15 '18 01:11 grosser

code looks like it should work VALID_ACTIONS = ['opened', 'edited', 'synchronize'].freeze and then return false if data['state'] != 'open' || !VALID_ACTIONS.include?(action) ... I think the issue is WEBHOOK_FILTER = /(^|\s)\[samson review\]($|\s)/i ... try adding [samson review] to the PR and see what happens

Opening a pr with [samson review] works fine, thanks!

adinhodovic avatar Nov 15 '18 02:11 adinhodovic

hmm it's like this since the beginning :( https://github.com/zendesk/samson/pull/746

your expectation makes more sense to me though, trigger on opening a PR and enable re-review for "Any PR" ... so the change we'd need is to migrate all any_pr settings to be any_pr_with_keyword (or something like that) and then add that as an option with a new any_pr that behaves as you described

please make a PR if you can, it's always great to get fresh eyes on the code to see what's good/bad if you get stuck @zendesk/bre or I can help out :)

grosser avatar Nov 16 '18 01:11 grosser

and a /cc for @mwerner just for fun :)

grosser avatar Nov 16 '18 01:11 grosser