Skip to content
Merged
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: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This way even entityIds like environmentIds or testCaseIds will be autocompleted

# octomind

Octomind cli tool. Version: 4.6.1. Additional documentation see https://octomind.dev/docs/api-reference/
Octomind cli tool. Version: 4.7.0. Additional documentation see https://octomind.dev/docs/api-reference/

**Usage:** `octomind [options] [command]`

Expand Down Expand Up @@ -434,6 +434,7 @@ Pull test cases from the test target
| `-j, --json` | Output raw JSON response | No | |
| `-t, --test-target-id [id]` | Test target ID, if not provided will use the test target id from the config | No | |
| `-p, --test-plan-id [id]` | Optional test plan ID to filter test cases | No | |
| `-r, --test-report-id [id]` | Optional test report ID to only pull test case auto-fixes from a specific test report | No | |

## push

Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.13/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@octomind/octomind",
"version": "4.6.1",
"version": "4.7.0",
"description": "a command line client for octomind apis",
"main": "./dist/index.js",
"packageManager": "pnpm@10.28.1+sha512.7d7dbbca9e99447b7c3bf7a73286afaaf6be99251eb9498baefa7d406892f67b879adb3a1d7e687fc4ccc1a388c7175fbaae567a26ab44d1067b54fcb0d6a316",
Expand Down
4 changes: 4 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ export const buildCmd = async (): Promise<CompletableCommand> => {
"-p, --test-plan-id [id]",
"Optional test plan ID to filter test cases",
)
.option(
"-r, --test-report-id [id]",
"Optional test report ID to only pull test case auto-fixes from a specific test report",
)
.action(addTestTargetWrapper(pullTestTarget));

// noinspection RequiredAttributes
Expand Down
15 changes: 9 additions & 6 deletions src/tools/test-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ export const listTestTargets = async (options: ListOptions): Promise<void> => {
};

export const pullTestTarget = async (
options: { testTargetId: string; testPlanId?: string } & ListOptions,
options: {
testTargetId: string;
testPlanId?: string;
testReportId?: string;
} & ListOptions,
): Promise<void> => {
const { data, error } = await client.GET(
"/apiKey/beta/test-targets/{testTargetId}/pull",
Expand All @@ -79,11 +83,10 @@ export const pullTestTarget = async (
path: {
testTargetId: options.testTargetId,
},
query: options.testPlanId
? {
testPlanId: options.testPlanId,
}
: undefined,
query: {
testPlanId: options.testPlanId,
testReportId: options.testReportId,
},
},
},
);
Expand Down