Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/five-seas-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hypercerts-org/sdk-react": patch
---

Fix type error in useOrganizations hook: use `handlePrefix` instead of `handle` in CreateOrganizationParams
12 changes: 12 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"permissions": {
"allow": [
"Bash(pnpm build:*)",
"Bash(pnpm check:*)",
"Bash(pnpm format:*)",
"Bash(pnpm lint:*)",
"Bash(pnpm test:*)",
"Bash(pnpm typecheck:*)"
]
}
}
1 change: 1 addition & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- run: pnpm install
- run: pnpm build
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm format:check
- run: pnpm test

Expand Down
13 changes: 13 additions & 0 deletions opencode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"bash": {
"pnpm build*": "allow",
"pnpm check*": "allow",
"pnpm format*": "allow",
"pnpm lint*": "allow",
"pnpm test*": "allow",
"pnpm typecheck*": "allow"
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"clean": "turbo clean",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "turbo build && changeset publish"
"release": "turbo check && changeset publish"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-react/src/hooks/useOrganizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function useOrganizations(): UseOrganizationsResult {
const org = await repository.organizations.create({
name: params.name,
description: params.description,
handle: params.handle,
handlePrefix: params.handlePrefix,
});

return org;
Expand Down
4 changes: 3 additions & 1 deletion packages/sdk-react/tests/hooks/useOrganizations.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ describe("useOrganizations", () => {

const createParams = {
name: "New Org",
handlePrefix: "new-org",
description: "A new organization",
};

Expand All @@ -172,6 +173,7 @@ describe("useOrganizations", () => {
expect(mockCreate).toHaveBeenCalledWith(
expect.objectContaining({
name: "New Org",
handlePrefix: "new-org",
description: "A new organization",
}),
);
Expand Down Expand Up @@ -214,7 +216,7 @@ describe("useOrganizations", () => {

// Start create without awaiting
act(() => {
result.current.create({ name: "New Org" });
result.current.create({ name: "New Org", handlePrefix: "new-org" });
});

await waitFor(() => {
Expand Down