From d731c4ebeff83b125a15b54804a9bb2b7ebc4933 Mon Sep 17 00:00:00 2001 From: Daniel Draper Date: Tue, 3 Feb 2026 17:50:32 +0100 Subject: [PATCH] expose test report id on pull --- README.md | 3 ++- biome.json | 2 +- package.json | 2 +- src/cli.ts | 4 ++++ src/tools/test-targets.ts | 15 +++++++++------ 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fa82587..1868f88 100644 --- a/README.md +++ b/README.md @@ -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]` @@ -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 diff --git a/biome.json b/biome.json index e30cda2..500b115 100644 --- a/biome.json +++ b/biome.json @@ -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", diff --git a/package.json b/package.json index a74cd2a..d760787 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/cli.ts b/src/cli.ts index 8143ca9..2923e1d 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -410,6 +410,10 @@ export const buildCmd = async (): Promise => { "-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 diff --git a/src/tools/test-targets.ts b/src/tools/test-targets.ts index dc6e8f1..41def94 100644 --- a/src/tools/test-targets.ts +++ b/src/tools/test-targets.ts @@ -70,7 +70,11 @@ export const listTestTargets = async (options: ListOptions): Promise => { }; export const pullTestTarget = async ( - options: { testTargetId: string; testPlanId?: string } & ListOptions, + options: { + testTargetId: string; + testPlanId?: string; + testReportId?: string; + } & ListOptions, ): Promise => { const { data, error } = await client.GET( "/apiKey/beta/test-targets/{testTargetId}/pull", @@ -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, + }, }, }, );