Skip to content

Commit 9fdcce1

Browse files
chore(mcp-server): improve instructions
1 parent 1a7a7cb commit 9fdcce1

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,18 @@ jobs:
5555
run: ./scripts/build
5656

5757
- name: Get GitHub OIDC Token
58-
if: github.repository == 'stainless-sdks/gradient-typescript'
58+
if: |-
59+
github.repository == 'stainless-sdks/gradient-typescript' &&
60+
!startsWith(github.ref, 'refs/heads/stl/')
5961
id: github-oidc
6062
uses: actions/github-script@v8
6163
with:
6264
script: core.setOutput('github_token', await core.getIDToken());
6365

6466
- name: Upload tarball
65-
if: github.repository == 'stainless-sdks/gradient-typescript'
67+
if: |-
68+
github.repository == 'stainless-sdks/gradient-typescript' &&
69+
!startsWith(github.ref, 'refs/heads/stl/')
6670
env:
6771
URL: https://pkg.stainless.com/s
6872
AUTH: ${{ steps.github-oidc.outputs.github_token }}

src/client.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,9 @@ export class Gradient {
433433
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
434434

435435
const defaultQuery = this.defaultQuery();
436-
if (!isEmptyObj(defaultQuery)) {
437-
query = { ...defaultQuery, ...query };
436+
const pathQuery = Object.fromEntries(url.searchParams);
437+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
438+
query = { ...pathQuery, ...defaultQuery, ...query };
438439
}
439440

440441
if (typeof query === 'object' && query && !Array.isArray(query)) {

0 commit comments

Comments
 (0)