Skip to content

Fix dead --json flag in organization & project delete operations#70

Merged
austin-denoble merged 2 commits intomainfrom
adenoble/fix-org-project-delete-json-flags
Mar 18, 2026
Merged

Fix dead --json flag in organization & project delete operations#70
austin-denoble merged 2 commits intomainfrom
adenoble/fix-org-project-delete-json-flags

Conversation

@austin-denoble
Copy link
Collaborator

@austin-denoble austin-denoble commented Mar 18, 2026

Problem

The organization and project delete commands had the --json flag implemented, but it was being ignored in code.

Solution

  • Fix organization and project delete operations ignoring the --json flag. Extract the run command from both into isolated functions so they can be tested on. Add unit test files for both.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Unit tests added, run a project delete command with --json and evaluate the output.

Deleting an organization is technically exposed in the API / CLI, but in practice this is difficult as you have to delete everything within that organization first.


Note

Low Risk
Low risk: change only affects CLI output formatting for delete commands and adds unit coverage; deletion behavior itself is unchanged.

Overview
Fixes pc organization delete and pc project delete so the --json flag is actually honored after a successful delete.

Both commands now route deletion through runDeleteOrganizationCmd/runDeleteProjectCmd, which either prints a structured JSON payload ({"deleted":true,"name":...,"id":...}) or the existing human-readable success message, and new unit tests cover success, JSON output, and error propagation.

Written by Cursor Bugbot for commit 9335145. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Local developer settings file accidentally committed
    • Removed .claude/settings.local.json from version control and added it to .gitignore to prevent future commits.

Create PR

Or push these changes by commenting:

@cursor push c5c35fa799
Preview (c5c35fa799)
diff --git a/.claude/settings.local.json b/.claude/settings.local.json
deleted file mode 100644
--- a/.claude/settings.local.json
+++ /dev/null
@@ -1,19 +1,0 @@
-{
-  "permissions": {
-    "allow": [
-      "mcp__claude_ai_Linear__get_project",
-      "mcp__claude_ai_Linear__list_teams",
-      "mcp__claude_ai_Linear__list_issue_labels",
-      "mcp__claude_ai_Linear__create_issue_label",
-      "mcp__claude_ai_Linear__save_issue",
-      "mcp__claude_ai_Linear__list_issues",
-      "mcp__claude_ai_Linear__get_issue",
-      "mcp__claude_ai_Linear__list_issue_statuses",
-      "Bash(git checkout:*)",
-      "Bash(go build:*)",
-      "Bash(go test:*)",
-      "Bash(grep:*)",
-      "Bash(go doc:*)"
-    ]
-  }
-}
\ No newline at end of file

diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,6 @@
 
 # Man pages
 man/
+
+# Claude Code local settings
+.claude/settings.local.json

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

@austin-denoble austin-denoble merged commit a124bc8 into main Mar 18, 2026
8 checks passed
@austin-denoble austin-denoble deleted the adenoble/fix-org-project-delete-json-flags branch March 18, 2026 20:30
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