Skip to content

Commit

Permalink
Merge pull request #13966 from code-dot-org/updateSetupMd
Browse files Browse the repository at this point in the history
Add bin/dotd check for CDO tokens.
  • Loading branch information
ashercodeorg committed Mar 23, 2017
2 parents 305300b + cbe40b1 commit 1be80a0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bin/dotd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ end
# Global to prevent it from being passed around everywhere.
@dotd_name = ''

# Checks that CDO.github_access_token and CDO.slack_token are defined. If not,
# exits the program.
def check_for_cdo_keys
unless CDO.github_access_token && CDO.slack_token
puts <<-EOS.unindent
This script requires CDO.github_access_token and CDO.slack_token.
Please add them to your locals.yml and rerun the script.
EOS
exit
end
end

# Prints the script intro to the console.
def puts_script_intro
puts <<-EOS.unindent
Expand Down Expand Up @@ -252,6 +267,8 @@ def do_dtt_subroutine
end

def main
check_for_cdo_keys

puts_script_intro
ask_for_name

Expand Down

0 comments on commit 1be80a0

Please sign in to comment.