Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to respond only to certain events #235

Merged
merged 3 commits into from
Aug 6, 2015
Merged

Add the ability to respond only to certain events #235

merged 3 commits into from
Aug 6, 2015

Conversation

binford2k
Copy link
Member

This adds a new webhook param, which allows you to define an event or
list of events to respond to as a single string or an array.

class {'r10k::webhook::config':
  enable_ssl        => true,
  protected         => true,
  repository_events => ['push','release'],
  notify            => Service['webhook'],
}

This required extending the webhook.yaml.erb to also expand and sort
array data types.

Yes, you could do the same by only configuring certain github events,
but this allows you to more easily do it in code on the master.

Limitations: currently supports only github events.

This adds a new webhook param, which allows you to define an event or
list of events to respond to as a single string or an array.

``` Puppet
class {'r10k::webhook::config':
  enable_ssl        => true,
  protected         => true,
  repository_events => ['push','release'],
  notify            => Service['webhook'],
}
```

This required extending the `webhook.yaml.erb` to also expand and sort
array data types.

Yes, you could do the same by only configuring certain github events,
but this allows you to more easily do it in code on the master.

Limitations: currently supports only github events.
@binford2k
Copy link
Member Author

Btw, I didn't muck with the spec tests, because they all fail on master for me.

@acidprime
Copy link
Collaborator

Try bundle exec rake spec <- offline converation

acidprime added a commit that referenced this pull request Aug 6, 2015
Add the ability to respond only to certain events
@acidprime acidprime merged commit da48668 into voxpupuli:master Aug 6, 2015
@acidprime
Copy link
Collaborator

This was failing for ruby 1.8.7 because of the way to_s used to work on arrays , fixed with 0b26d6d if your curious.

@binford2k binford2k deleted the feature/events branch August 6, 2015 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants