Skip to content

Commit

Permalink
feat: config in cli (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrygriffiths authored Feb 20, 2022
1 parent ae8df4b commit 373932e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion branch-rules.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import requests
import json
import sys

with open('config.json') as json_file:
if len(sys.argv) > 1:
configfilename = sys.argv[1]
else:
configfilename = 'config.json'

with open(configfilename) as json_file:
config = json.load(json_file)

username = config['username']
Expand Down

0 comments on commit 373932e

Please sign in to comment.