Fixes checking for github bots in contributors

This commit is contained in:
Brenda Wallace
2019-02-08 09:13:26 +13:00
parent b29ab46a48
commit c8e5cecaf6
2 changed files with 6 additions and 3 deletions

View File

@@ -93,5 +93,4 @@ submit the change with your pull request.
### Security and Dependency Updates
- DeppBot / [deppbot](https://github.com/deppbot)
- dependabot[bot] / [dependabot-bot] / [dependabot] (https://github.com/dependabot-bot)
- dependabot / [dependabot](https://github.com/dependabot)
- dependabot[bot] (https://github.com/dependabot-bot)

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
puts "Checking to see if you're in CONTRIBUTORS.md..."
if ENV['TRAVIS']
if ENV['TRAVIS_PULL_REQUEST']
require 'httparty'
@@ -18,7 +19,7 @@ if ENV['TRAVIS']
end
else
author = `git config github.user`.chomp
if $CHILD_STATUS.exitstatus.positive?
if $?.exitstatus.positive?
abort %(
Couldn't determine your GitHub username, and not in a Travis PR build
Please set it using
@@ -27,6 +28,9 @@ Please set it using
end
end
author.sub! '[', '\\['
author.sub! ']', '\\]'
unless system('grep', '-i', author, 'CONTRIBUTORS.md')
abort %(
Thanks for your contribution, #{author}!