Skip to content

Commit 768ce13

Browse files
committed
feat(api): update via SDK Studio
1 parent 29c34df commit 768ce13

File tree

163 files changed

+5889
-13045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+5889
-13045
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ RUN apt-get update && apt-get install -y \
77
yarnpkg \
88
&& apt-get clean autoclean
99

10+
# Ensure UTF-8 encoding
11+
ENV LANG=C.UTF-8
12+
ENV LC_ALL=C.UTF-8
13+
1014
# Yarn
1115
RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
1216

.github/workflows/ci.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,36 @@ jobs:
1111
lint:
1212
name: lint
1313
runs-on: ubuntu-latest
14-
if: github.repository == 'intercom/intercom-node'
14+
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- name: Set up Node
20-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
2121
with:
2222
node-version: '18'
2323

2424
- name: Install dependencies
25-
run: |
26-
yarn install
25+
run: yarn install
2726

2827
- name: Check types
29-
run: |
30-
yarn build
28+
run: ./scripts/lint
29+
test:
30+
name: test
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Set up Node
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '18'
40+
41+
- name: Bootstrap
42+
run: ./scripts/bootstrap
43+
44+
- name: Run tests
45+
run: ./scripts/test
46+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Create releases
2+
on:
3+
schedule:
4+
- cron: '0 5 * * *' # every day at 5am UTC
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
name: release
12+
if: github.ref == 'refs/heads/main' && github.repository == 'intercom/intercom-node'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: stainless-api/trigger-release-please@v1
19+
id: release
20+
with:
21+
repo: ${{ github.event.repository.full_name }}
22+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
23+
24+
- name: Set up Node
25+
if: ${{ steps.release.outputs.releases_created }}
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: '18'
29+
30+
- name: Install dependencies
31+
if: ${{ steps.release.outputs.releases_created }}
32+
run: |
33+
yarn install
34+
35+
- name: Publish to NPM
36+
if: ${{ steps.release.outputs.releases_created }}
37+
run: |
38+
bash ./bin/publish-npm
39+
env:
40+
NPM_TOKEN: ${{ secrets.INTERCOM_NPM_TOKEN || secrets.NPM_TOKEN }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Handle release PR title edits
2+
on:
3+
pull_request:
4+
types:
5+
- edited
6+
- unlabeled
7+
8+
jobs:
9+
update_pr_content:
10+
name: Update pull request content
11+
if: |
12+
((github.event.action == 'edited' && github.event.changes.title.from != github.event.pull_request.title) ||
13+
(github.event.action == 'unlabeled' && github.event.label.name == 'autorelease: custom version')) &&
14+
startsWith(github.event.pull_request.head.ref, 'release-please--') &&
15+
github.event.pull_request.state == 'open' &&
16+
github.event.sender.login != 'stainless-bot' &&
17+
github.event.sender.login != 'stainless-app' &&
18+
github.repository == 'intercom/intercom-node'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: stainless-api/trigger-release-please@v1
23+
with:
24+
repo: ${{ github.event.repository.full_name }}
25+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

.github/workflows/publish-npm.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# workflow for re-running publishing to NPM in case it fails for some reason
2+
# you can run this workflow by navigating to https://www.github.com/intercom/intercom-node/actions/workflows/publish-npm.yml
3+
name: Publish NPM
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
publish:
9+
name: publish
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: '18'
19+
20+
- name: Install dependencies
21+
run: |
22+
yarn install
23+
24+
- name: Publish to NPM
25+
run: |
26+
bash ./bin/publish-npm
27+
env:
28+
NPM_TOKEN: ${{ secrets.INTERCOM_NPM_TOKEN || secrets.NPM_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release_doctor:
8+
name: release doctor
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'intercom/intercom-node' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Check release environment
16+
run: |
17+
bash ./bin/check-release-environment
18+
env:
19+
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
20+
NPM_TOKEN: ${{ secrets.INTERCOM_NPM_TOKEN || secrets.NPM_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
node_modules
22
yarn-error.log
33
codegen.log
4+
Brewfile.lock.json
45
dist
56
/deno
67
/*.tgz
78
.idea/
9+

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CHANGELOG.md
2-
/ecosystem-tests
2+
/ecosystem-tests/*/**
33
/node_modules
44
/deno
55

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"arrowParens": "always",
3+
"experimentalTernaries": true,
4+
"printWidth": 110,
5+
"singleQuote": true,
6+
"trailingComma": "all"
7+
}

0 commit comments

Comments
 (0)