diff --git a/codeflash/code_utils/code_utils.py b/codeflash/code_utils/code_utils.py index dfd79a76b..ce2c73432 100644 --- a/codeflash/code_utils/code_utils.py +++ b/codeflash/code_utils/code_utils.py @@ -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]." diff --git a/codeflash/code_utils/env_utils.py b/codeflash/code_utils/env_utils.py index ab0cb16e6..c1777cd2d 100644 --- a/codeflash/code_utils/env_utils.py +++ b/codeflash/code_utils/env_utils.py @@ -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 " @@ -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]." diff --git a/codeflash/code_utils/shell_utils.py b/codeflash/code_utils/shell_utils.py index 30a5aadaa..e540da5ec 100644 --- a/codeflash/code_utils/shell_utils.py +++ b/codeflash/code_utils/shell_utils.py @@ -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]."