Skip to content

Conversation

@cristipufu
Copy link
Member

No description provided.

@cristipufu cristipufu requested a review from Copilot June 12, 2025 09:31
@cristipufu cristipufu self-assigned this Jun 12, 2025
@cristipufu cristipufu merged commit 1dd7ee3 into main Jun 12, 2025
4 checks passed
@cristipufu cristipufu deleted the fix/register_folder_scoped branch June 12, 2025 09:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR centralizes the UIPATH_FOLDER_KEY validation in the _register method, removes a duplicate check, and updates the package version.

  • Adds an early check for the UIPATH_FOLDER_KEY environment variable with a descriptive error.
  • Removes the redundant folder key validation block later in the method.
  • Bumps the project version from 0.0.88 to 0.0.89.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/uipath_mcp/_cli/_runtime/_runtime.py Moved UIPATH_FOLDER_KEY env var check to the top of _register and removed duplicate logic.
pyproject.toml Updated project version to 0.0.89.
Comments suppressed due to low confidence (2)

src/uipath_mcp/_cli/_runtime/_runtime.py:263

  • No tests cover the new UIPATH_FOLDER_KEY missing scenario. Consider adding unit tests to verify that a UiPathMcpRuntimeError is raised with the correct code and messages when the env var is absent.
folder_key = os.environ.get("UIPATH_FOLDER_KEY")

pyproject.toml:3

  • The version bump isn’t accompanied by a changelog entry. Please add a note in CHANGELOG.md (or equivalent) summarizing the fix for missing folder key validation.
version = "0.0.89"

Comment on lines +263 to +268
folder_key = os.environ.get("UIPATH_FOLDER_KEY")
if not folder_key:
raise UiPathMcpRuntimeError(
"REGISTRATION_ERROR",
"No UIPATH_FOLDER_KEY environment variable set.",
"Please set the UIPATH_FOLDER_KEY environment variable.",
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The string literal "UIPATH_FOLDER_KEY" is repeated. Extract it into a module-level constant (e.g. FOLDER_KEY_ENV_VAR) to avoid duplication and typos.

Suggested change
folder_key = os.environ.get("UIPATH_FOLDER_KEY")
if not folder_key:
raise UiPathMcpRuntimeError(
"REGISTRATION_ERROR",
"No UIPATH_FOLDER_KEY environment variable set.",
"Please set the UIPATH_FOLDER_KEY environment variable.",
folder_key = os.environ.get(FOLDER_KEY_ENV_VAR)
if not folder_key:
raise UiPathMcpRuntimeError(
"REGISTRATION_ERROR",
f"No {FOLDER_KEY_ENV_VAR} environment variable set.",
f"Please set the {FOLDER_KEY_ENV_VAR} environment variable.",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant