-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from RHsyseng/block-sync-task
lock-sync-task
- Loading branch information
Showing
5 changed files
with
79 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,8 +167,8 @@ def set_cfg(): | |
cfg["smtp"] = os.environ.get("smtp_server") | ||
cfg["from"] = os.environ.get("source_email") | ||
cfg["to"] = os.environ.get("notification_email") | ||
cfg["alert_to"] = os.environ.get("alert_email") | ||
cfg["subject"] = os.environ.get("email_subject") | ||
cfg["alert_email"] = os.environ.get("alert_email") | ||
# slack | ||
cfg["slack_token"] = os.environ.get("slack_token") | ||
cfg["slack_channel"] = os.environ.get("slack_channel") | ||
|
@@ -190,6 +190,7 @@ def set_cfg(): | |
cfg["sla_settings"] = json.loads(os.environ.get("sla_settings")) | ||
# sso | ||
cfg["rbac"] = os.environ.get("rbac").split(",") if os.environ.get("rbac") else [] | ||
cfg["max_to_create"] = os.environ.get("max_to_create") | ||
return cfg | ||
|
||
|
||
|
@@ -199,7 +200,7 @@ def set_defaults(): | |
defaults["smtp"] = "localhost" | ||
defaults["from"] = "[email protected]" | ||
defaults["to"] = "" | ||
defaults["alert_to"] = "root@localhost" | ||
defaults["alert_email"] = "root@localhost" | ||
defaults["subject"] = "New Card(s) Have Been Created to Track Issues" | ||
defaults["sprintname"] = "" | ||
defaults["server"] = "" | ||
|
@@ -307,7 +308,7 @@ def get_fake_data(path="data/fake_data.json"): | |
dict: Dictionary that contains deserialized JSON data | ||
""" | ||
path = os.path.abspath(path) | ||
with open(path) as fake_data: | ||
with open(path, encoding="utf-8") as fake_data: | ||
data = json.load(fake_data) | ||
return data | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ def test_set_default(): | |
assert defaults["smtp"] == "localhost" | ||
assert defaults["from"] == "[email protected]" | ||
assert defaults["to"] == "" | ||
assert defaults["alert_to"] == "root@localhost" | ||
assert defaults["alert_email"] == "root@localhost" | ||
assert defaults["subject"] == "New Card(s) Have Been Created to Track Issues" | ||
assert defaults["sprintname"] == "" | ||
assert defaults["server"] == "" | ||
|