Skip to content

Commit 35098f0

Browse files
authored
chore: use x-stainless headers (#174)
1 parent 3ea0030 commit 35098f0

File tree

6 files changed

+27
-30
lines changed

6 files changed

+27
-30
lines changed

dist/build.js

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

dist/index.js

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

dist/merge.js

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

dist/preview.js

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

package-lock.json

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

src/stainless.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ export function getStainlessClient(
3939
};
4040

4141
if (action) {
42-
const actionPath = `stainless-api/upload-openapi-spec-action/${action}`;
43-
if (isGitLabCI()) {
44-
headers["X-GitLab-CI"] = actionPath;
45-
} else {
46-
headers["X-GitHub-Action"] = actionPath;
47-
}
42+
headers["X-Stainless-Platform"] = isGitLabCI()
43+
? "gitlab-ci"
44+
: "github-actions";
45+
headers["X-Stainless-Action"] =
46+
`stainless-api/upload-openapi-spec-action/${action}`;
4847
}
4948

5049
return new Stainless({

0 commit comments

Comments
 (0)