Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend _GIT_ENABLED Support to Note/Todo Deletions in nb CLI #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mweichert
Copy link
Contributor

This pull request introduces an enhancement to the nb CLI's handling of note and todo deletions, specifically in the context of the _GIT_ENABLED environment variable. The nb CLI already incorporates the _GIT_ENABLED variable, which, when set to a non-empty string, disables the use of GIT for its operations. This change extends that functionality to the deletion process of notes and todos.

Key Changes:

  • Conditional Git Command Execution: The script has been adjusted to conditionally execute git commands based on the _GIT_ENABLED variable. When this variable is set to an empty string, indicating GIT functionality is enabled, the script will execute git-specific commands. Conversely, if _GIT_ENABLED is not empty, these commands are bypassed.

  • Maintained Original Functionality: Outside the scope of the _GIT_ENABLED variable, the original functionality of the script remains unchanged. This ensures that existing workflows are not disrupted by this update.

Impact:

This change enhances the nb CLI's flexibility and control in environments where GIT usage might be restricted or not preferred. It allows users to leverage the full capabilities of nb without relying on GIT, aligning with scenarios where a simpler or more streamlined workflow is desired.

Testing:

  • GIT-Enabled Environments: Extensive testing in environments where _GIT_ENABLED is an empty string, to ensure that GIT commands execute as expected.
  • Non-GIT Environments: Validation in scenarios where _GIT_ENABLED is set to a non-empty string, confirming that GIT commands are appropriately skipped.

This update is a step forward in making the nb CLI more adaptable to various user environments and preferences. Your review and feedback on this implementation are highly appreciated.

Copy link

@kirubeltadesse kirubeltadesse left a comment

Choose a reason for hiding this comment

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

I wanted to clarify where in the code the _GIT_ENABLED variable is being set?

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.

None yet

2 participants