Skip to content
Closed
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
3 changes: 3 additions & 0 deletions codeflash/code_utils/code_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,6 @@ def exit_with_message(message: str, *, error_on_exit: bool = False) -> None:
paneled_text(message, panel_args={"style": "red"})

sys.exit(1 if error_on_exit else 0)


api_secret_docs_message = "For more information, refer to the documentation at [https://docs.codeflash.ai/getting-started/codeflash-github-actions#add-your-api-key-to-your-repository-secrets]."
4 changes: 3 additions & 1 deletion codeflash/code_utils/env_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def get_codeflash_api_key() -> str:
else:
api_key = os.environ.get("CODEFLASH_API_KEY") or read_api_key_from_shell_config()

api_secret_docs_message = "For more information, refer to the documentation at [https://docs.codeflash.ai/getting-started/codeflash-github-actions#add-your-api-key-to-your-repository-secrets]." # noqa
if not api_key:
msg = (
"I didn't find a Codeflash API key in your environment.\nYou can generate one at "
Expand Down Expand Up @@ -134,3 +133,6 @@ def is_pr_draft() -> bool:
"""Check if the PR is draft. in the github action context."""
event = get_cached_gh_event_data()
return bool(event.get("pull_request", {}).get("draft", False))


api_secret_docs_message = "For more information, refer to the documentation at [https://docs.codeflash.ai/getting-started/codeflash-github-actions#add-your-api-key-to-your-repository-secrets]."
3 changes: 3 additions & 0 deletions codeflash/code_utils/shell_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ def save_api_key_to_rc(api_key: str) -> Result[str, str]:
f"To ensure your Codeflash API key is automatically loaded into your environment at startup, you can create {shell_rc_path} and add the following line:{LF}"
f"{LF}{api_key_line}{LF}"
)


api_secret_docs_message = "For more information, refer to the documentation at [https://docs.codeflash.ai/getting-started/codeflash-github-actions#add-your-api-key-to-your-repository-secrets]."
Loading