Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion birdbath/checks/contrib/heroku.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
class HerokuNotProductionCheck(BaseCheck):
def check(self):
heroku_app_name = os.environ.get("HEROKU_APP_NAME")
return heroku_app_name and "production" not in heroku_app_name
if not heroku_app_name:
# When the variable is not set, we are not on Heroku.
return true
if "production" in heroku_app_name:
# If the variable is set and contains "production" we want to fail.
return false
return true


class HerokuAnonymisationAllowedCheck(BaseCheck):
Expand Down
Loading