-
Notifications
You must be signed in to change notification settings - Fork 142
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
Implement notifications configuration for .travis.yml #136
Conversation
I have need for similar functions. It would be nice if these PRs could be reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @nmaludy !
I added a couple of stylistic suggestions but feel free to provide rationale for the current choices if you feel they are merited.
@@ -88,7 +88,18 @@ branches: | |||
<% end -%> | |||
<% end -%> | |||
notifications: | |||
email: false | |||
<% notifications_arr = ((@configs['notifications'].to_a || []) - (@configs['remove_notifications'].to_a || [])) -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to guard against @configs['notifications']
possibly being nil
? I realize it has a default, but someone maybe could override it to nil
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a situation where this value was not an array but could be safely coerced into an array? If not, we can just drop to:
<% notifications_arr = ((@configs['notifications'].to_a || []) - (@configs['remove_notifications'].to_a || [])) -%> | |
<% notifications_arr = ((@configs['notifications'] || []) - (@configs['remove_notifications'] || [])) -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scotje Notifications is a hash, but in order to provide a "difference" between the @config['notifications']
and @config['remove_notifications']
i converted to an array to make this difference logic easier.
I think this code creates a bug in In notifications:
- slack:
secure: BLAHBLAHBLAHBLAHBLAHBLAH I tried a few variations of Any ideas? |
@ardrigh I was able to configure both notifications:
email: false
slack:
secure: foozle and running |
@scotje sorry I haven't tested this for a while. I just tried PDK 1.9.1 and I have the format working now, so it's not trying to remove the secure notification for Slack any longer. |
Closes #119
This PR implements an override in
.travis.yml
for thenotifications
section so repos can send notifications to things like Slack.