behaviorbot / new-issue-welcome

Welcome users when they open their first issue in your repository
https://github.com/apps/welcome
MIT License
40 stars 31 forks source link

support when config is null #31

Closed philschatz closed 6 years ago

philschatz commented 6 years ago

context.config('config.yml') may return null in some cases (for example, https://github.com/probot/probot/blob/master/lib/context.js#L112 ).

This ensures that the config is non-null before checking if newIssueWelcomeComment is set.

welcome[bot] commented 6 years ago

Thanks so much for opening your first PR here!

update-docs[bot] commented 6 years ago

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update some of our documentation based on your changes.

hiimbex commented 6 years ago

Hi @philschatz! Thanks for your contribution! Although, currently if the cnfig were null, that error would be handled by the catch section, I'm not opposed to being more explicit. I think it might be better to simply check if ( config ) as opposed to if (config != null ) to cover more possibilities. Once changed, I'd be happy to merge this in!

welcome[bot] commented 6 years ago

Congrats on merging your first pull request here! :tada: How awesome!