✨ feat: improve CustomPRState.tsx
swadhinbiswas committed 3 months ago
9d59de7
1 parent 9f9cf5d
commit 9d59de7
1 file changed
+1 -1
Showing 1 changed file+1-1
▼src/components/pulls/CustomPRState.tsx
+1-1
| @@ -61,7 +61,7 @@ export function CustomPRState({ initialStateId, customStates, repoOwner, repoNam | ||
61 | 61 | const res = await fetch(`/api/repos/${repoOwner}/${repoName}/pulls/${prNumber}/state`, { |
62 | 62 | method: "POST", |
63 | 63 | headers: { "Content-Type": "application/json" }, |
64 | - body: JSON.stringify({ state: selectedState }), | |
64 | + body: JSON.stringify(selectedState.startsWith('custom:') ? { stateId: selectedState.replace('custom:', '') } : { state: selectedState.replace('builtin:', '') }), | |
65 | 65 | }); |
66 | 66 | const data = await res.json(); |
67 | 67 | if (!res.ok) { |
68 | 68 | |