vmware-archive / projectmonitor

Big Visible Chart CI aggregator
http://ci.pivotallabs.com
BSD 2-Clause "Simplified" License
428 stars 120 forks source link

handle CircleCi webhooks #76

Closed sweetleon closed 8 years ago

sweetleon commented 9 years ago

fixes https://github.com/pivotal/projectmonitor/issues/54

objcode commented 9 years ago

Added branch-filtering to CircleCi webhooks!

andistuder commented 8 years ago

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?

tjgrathwell commented 8 years ago

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