Skip to content

Commit

Permalink
Merge pull request #127 from sclorg/fix_traceback
Browse files Browse the repository at this point in the history
Fix traceback in case self.betka['use_gitlab_forks'] does not exist
  • Loading branch information
phracek authored Nov 5, 2024
2 parents 0fa9ccd + 24ee4f1 commit ab69153
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
dockerfiles: ./Dockerfile
image: betka
tags: latest 1 ${{ github.sha }} 0.9.0
tags: latest 1 ${{ github.sha }} 0.9.1

- name: Push betka image to Quay.io
id: push-to-quay
Expand Down
5 changes: 4 additions & 1 deletion betka/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ def set_config(self):
"""
self.set_config_from_env(self.config_json["github_api_token"])
self.set_config_from_env(self.config_json["gitlab_user"])
self.set_config_from_env(self.config_json["use_gitlab_forks"])
if "slack_webhook_url" in self.config_json:
self.set_config_from_env(self.config_json["slack_webhook_url"])
self.set_config_from_env("PROJECT")
self.betka_config["gitlab_api_token"] = os.environ[
self.config_json["gitlab_api_token"]
]
self.betka_config["generator_url"] = self.config_json["generator_url"]
if "use_gitlab_forks" not in self.config_json:
self.betka_config["use_gitlab_forks"] = False
else:
self.betka_config["use_gitlab_forks"] = self.config_json["use_gitlab_forks"]
betka_url_base = self.config_json["betka_url_base"]
if getenv("DEPLOYMENT") == "prod":
self.betka_config["betka_yaml_url"] = f"{betka_url_base}betka-prod.yaml"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_requirements():

setup(
name="betka",
version="0.9.0",
version="0.9.1",
packages=find_packages(exclude=["examples", "tests"]),
url="https://github.com/sclorg/betka",
license="GPLv3+",
Expand Down

0 comments on commit ab69153

Please sign in to comment.