-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvironment-conf.rb
More file actions
40 lines (28 loc) · 820 Bytes
/
environment-conf.rb
File metadata and controls
40 lines (28 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
##############################
# Environment Based Config
##############################
def as_boolean(input, default)
input = (input || '').downcase.strip
if input == 'true'
return true
end
if input == 'false'
return false
end
return default
end
# dry run?
DRY_RUN = as_boolean(ENV['DRY_RUN'], true)
# delete existing labels which are not specified?
DELETE_MISSING = as_boolean(ENV['DELETE_MISSING'], false)
# skip labels which exist already
SKIP_EXISTING = as_boolean(ENV['SKIP_EXISTING'], true)
# labels file
LABELS_FILE = ENV['LABELS_FILE'] || 'labels.json'
# Specify the github project
GITHUB_REPOSITORY = ENV['GITHUB_REPO']
# Github login creds
GITHUB_LOGIN = ENV['GITHUB_LOGIN']
GITHUB_PASSWORD = ENV['GITHUB_PASSWORD']
# or set this instead
GITHUB_API_KEY = ENV['GITHUB_API_KEY']