Closed sweetleon closed 8 years ago
Added branch-filtering to CircleCi webhooks!
I believe the CircleCI webhook works for the current head of master. But, I'd be interested in the branch filtering feature. @dipolesource is this of interest?
Fixing with f7f1927061aea88a2d141caf82c808340262a1e2 instead to mirror the way that TravisCI and Codeship payloads currently do it.
Also uses an exact match instead of a regexp, I think the regexp code in this PR is not quite right because
> status_content = [{'branch' => 'master-with-extra-characters'}]
> branch_name = 'banana'
> !!(/#{branch_name}/ =~ status_content.first['branch'])
=> false
> branch_name = 'master-with-extra-characters'
> !!(/#{branch_name}/ =~ status_content.first['branch'])
=> true
> branch_name = 'master'
> !!(/#{branch_name}/ =~ status_content.first['branch'])
=> true
fixes https://github.com/pivotal/projectmonitor/issues/54