Skip to content

Commit 34c06ba

Browse files
authored
Add support for fetching and resolving issues (#52)
* Added ability to get and resolve issues A * Move to pnpm and add prettier lint * regen lock files * remove matrix usage
1 parent 781758e commit 34c06ba

21 files changed

+6538
-17139
lines changed

.changeset/slow-timers-raise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@team-plain/typescript-sdk': minor
3+
---
4+
5+
Add ability to get issues (`client.getIssues()`) and resolve issues (`client.resolveIssue()`)

.github/workflows/lint.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@ jobs:
1313
name: Lint
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v3
16+
- uses: actions/checkout@v3
17+
- uses: pnpm/action-setup@v2
1818
with:
19-
node-version: '16'
19+
version: 8
20+
- name: Setup node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 18
24+
cache: 'pnpm'
2025
- name: Install dependencies
21-
run: npm ci
26+
run: pnpm install
2227
- name: Lint
23-
run: npm run lint
28+
run: pnpm run lint
2429
- name: GraphQL Mutation Filenames
2530
uses: batista/lint-filenames@v1.0.1
2631
with:

.github/workflows/release.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,27 @@ jobs:
1212
name: Release
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/setup-node@v2
15+
- uses: actions/checkout@v3
16+
- uses: pnpm/action-setup@v2
1617
with:
17-
node-version: '16'
18-
- uses: actions/checkout@v2
18+
version: 8
19+
- name: Setup node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 18
23+
cache: 'pnpm'
24+
- name: Install dependencies
25+
run: pnpm install
1926
- uses: tibdex/github-app-token@v1
2027
id: generate-token
2128
with:
2229
app_id: ${{ secrets.GH_WORKFLOW_APP_ID }}
2330
private_key: ${{ secrets.GH_WORKFLOW_APP_PRIVATE_KEY }}
24-
- name: Install dependencies
25-
run: npm ci
2631
- name: Create Release Pull Request or Publish to npm
2732
id: changesets
2833
uses: changesets/action@v1
2934
with:
30-
publish: npm run release
35+
publish: pnpm run release
3136
env:
3237
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
3338
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@ jobs:
1313
name: Test
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v3
16+
- uses: actions/checkout@v3
17+
- uses: pnpm/action-setup@v2
1818
with:
19-
node-version: '16'
19+
version: 8
20+
- name: Setup node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 18
24+
cache: 'pnpm'
2025
- name: Install dependencies
21-
run: npm ci
26+
run: pnpm install
2227
- name: Test
23-
run: npm run test
28+
run: pnpm run test
2429
- name: Build
2530
# This checks that the package can be built
26-
run: npm run build
31+
run: pnpm run build

.github/workflows/typecheck.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ jobs:
1313
name: Typecheck
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v3
16+
- uses: actions/checkout@v3
17+
- uses: pnpm/action-setup@v2
1818
with:
19-
node-version: '16'
19+
version: 8
20+
- name: Setup node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 18
24+
cache: 'pnpm'
2025
- name: Install dependencies
21-
run: npm i
26+
run: pnpm install
2227
- name: Typecheck
23-
run: npm run typecheck
28+
run: pnpm run typecheck

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dist
44
# dependencies
55
node_modules
66
yarn.lock
7-
pnpm-lock.yaml
7+
package-lock.json
88

99
# logs
1010
*.log

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,8 @@ Equivalent to a 401 or 403 response. Normally means your API key doesn't exist o
9393

9494
[(view source)](./src/error.ts)
9595
Equivalent to a 500 response. If this happens something unexpected within Plain happened.
96+
97+
### UnknownError
98+
99+
[(view source)](./src/error.ts)
100+
Fallback error type when something unexpected happens.

0 commit comments

Comments
 (0)