Skip to content

Commit 71d0c64

Browse files
meorphismeorphis
andauthored
chore: always pass logLevel warn to the SDK clients (#207)
Co-authored-by: meorphis <eric@stainless.com>
1 parent 83fb540 commit 71d0c64

File tree

6 files changed

+12
-18
lines changed

6 files changed

+12
-18
lines changed

dist/build.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/merge.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/preview.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/compat/github/api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { logger } from "../../logger";
1010
import type { APIClient, Comment, PullRequest } from "../api";
1111
import { getInput } from "../input";
1212
import { getGitHubContext as ctx } from "./context";
13-
import { LogLevel } from "@stainless-api/github-internal/client";
1413

1514
class GitHubClient implements APIClient {
1615
private client: PartialGitHub<{
@@ -28,8 +27,7 @@ class GitHubClient implements APIClient {
2827
owner: ctx().owner,
2928
repo: ctx().repo,
3029
resources: [BaseCommits, BaseComments, BasePulls],
31-
logLevel: (getInput("log_level", { required: false }) ??
32-
"warn") as LogLevel,
30+
logLevel: "warn",
3331
logger,
3432
});
3533
}

src/compat/gitlab/api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { logger } from "../../logger";
1515
import type { APIClient, Comment, PullRequest } from "../api";
1616
import { getInput } from "../input";
1717
import { getGitLabContext as ctx } from "./context";
18-
import { LogLevel } from "@stainless-api/gitlab-internal/client";
1918

2019
class GitLabClient implements APIClient {
2120
private client: PartialGitLab<{
@@ -30,8 +29,7 @@ class GitLabClient implements APIClient {
3029
apiToken: token,
3130
baseURL: ctx().urls.api,
3231
resources: [BaseCommits, BaseMergeRequests, BaseNotes],
33-
logLevel: (getInput("log_level", { required: false }) ??
34-
"warn") as LogLevel,
32+
logLevel: "warn",
3533
logger,
3634
});
3735
}

src/wrapAction.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { getInput } from "./compat/input";
33
import { getStainlessAuth } from "./compat";
44
import { createAutoRefreshFetch, getStainlessClient } from "./stainless";
55
import { logger } from "./logger";
6-
import { LogLevel } from "@stainless-api/sdk/client";
76

87
const accumulatedBuildIds = new Set<string>();
98

@@ -32,8 +31,7 @@ export function wrapAction(
3231
stainless = getStainlessClient(actionType, {
3332
project: projectName,
3433
apiKey: auth.key,
35-
logLevel: (getInput("log_level", { required: false }) ??
36-
"warn") as LogLevel,
34+
logLevel: "warn",
3735
logger,
3836
fetch: createAutoRefreshFetch(auth, getStainlessAuth),
3937
});

0 commit comments

Comments
 (0)