Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ def main():
type=str,
default="deploy",
)
parser.add_argument(
"-k",
"--openai-key",
help="Pass the openai key for create commit summary by Author and repo.",
type=str,
default=None,
)

args = parser.parse_args()

Expand All @@ -62,6 +69,7 @@ def main():
months_back = None
save_file_name = None
deploy_dir = None
openai_key = None

config_loaded_successfully = False

Expand All @@ -73,6 +81,8 @@ def main():
company_identifier = config_data.get("company_identifier", "")
months_back = config_data.get("months_back", None)
deploy_dir = config_data.get("deploy_dir", None)
openai_apikey = config_data.get("openai_apikey", None)

config_loaded_successfully = True
print(f"Configuration loaded from {args.config_file}.")
else:
Expand All @@ -93,6 +103,8 @@ def main():
months_back = args.months_back
if args.deploy_dir:
deploy_dir = args.deploy_dir
if args.openai_key:
openai_key = args.openai_key

if args.deploy_dir:
deploy_dir = args.deploy_dir
Expand Down
1 change: 1 addition & 0 deletions src/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def load_config_from_ini(file_path: str) -> dict | None:
)
git_config["months_back"] = config["GitConfig"].getint("months_back", None)
git_config["deploy_dir"] = config["GitConfig"].get("deploy_dir", None)
git_config["openai_apikey"] = config["OpenAi"].get("openai_apikey", None)
return git_config
except Exception as e:
print(f"Error reading INI file {file_path}: {e}")
Expand Down
Loading