glitchgrab 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +106 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -161,13 +161,118 @@ curl -H "Authorization: Bearer gg_your_token" \
|
|
|
161
161
|
"issue": {
|
|
162
162
|
"githubNumber": 42,
|
|
163
163
|
"githubUrl": "https://github.com/your/repo/issues/42",
|
|
164
|
-
"title": "Button not working"
|
|
164
|
+
"title": "Button not working",
|
|
165
|
+
"labels": ["bug"],
|
|
166
|
+
"severity": "medium",
|
|
167
|
+
"githubState": "open"
|
|
165
168
|
}
|
|
166
169
|
}
|
|
167
170
|
]
|
|
168
171
|
}
|
|
169
172
|
```
|
|
170
173
|
|
|
174
|
+
### Response fields
|
|
175
|
+
|
|
176
|
+
| Field | Description |
|
|
177
|
+
|-------|-------------|
|
|
178
|
+
| `id` | Report ID — use this for [managing issues](#managing-issues-approve--reject--close) |
|
|
179
|
+
| `source` | `SDK_AUTO` (crash) or `SDK_USER_REPORT` (user clicked report) |
|
|
180
|
+
| `status` | `PENDING`, `PROCESSING`, `CREATED`, `FAILED` |
|
|
181
|
+
| `reporterPrimaryKey` | The `userId` you passed in the session prop |
|
|
182
|
+
| `reporterName` | Reporter's display name |
|
|
183
|
+
| `issue.githubState` | Live GitHub issue state: `open`, `closed`, or `null` if deleted |
|
|
184
|
+
| `issue.labels` | Labels on the GitHub issue (e.g., `["bug", "approved"]`) |
|
|
185
|
+
| `issue.severity` | AI-assigned severity |
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Managing Issues (Approve / Reject / Close)
|
|
189
|
+
|
|
190
|
+
Once a report creates a GitHub issue, you can manage it from the dashboard or via API.
|
|
191
|
+
|
|
192
|
+
### Dashboard
|
|
193
|
+
|
|
194
|
+
Go to **Reports > Product Issues**. Each open report shows:
|
|
195
|
+
- **Approve** — adds `approved` label to GitHub issue
|
|
196
|
+
- **Reject** — adds `rejected` label to GitHub issue
|
|
197
|
+
- **Close** — closes the GitHub issue
|
|
198
|
+
|
|
199
|
+
### REST API
|
|
200
|
+
|
|
201
|
+
`POST /api/v1/reports/{reportId}/actions`
|
|
202
|
+
|
|
203
|
+
Auth: `Bearer gg_` token or dashboard session.
|
|
204
|
+
|
|
205
|
+
#### Approve a report
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
curl -X POST \
|
|
209
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
210
|
+
-H "Content-Type: application/json" \
|
|
211
|
+
-d '{"action": "label", "label": "approved"}' \
|
|
212
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
#### Reject a report
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
curl -X POST \
|
|
219
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
220
|
+
-H "Content-Type: application/json" \
|
|
221
|
+
-d '{"action": "label", "label": "rejected"}' \
|
|
222
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Close an issue
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
curl -X POST \
|
|
229
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
230
|
+
-H "Content-Type: application/json" \
|
|
231
|
+
-d '{"action": "close"}' \
|
|
232
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
#### Reopen an issue
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
curl -X POST \
|
|
239
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
240
|
+
-H "Content-Type: application/json" \
|
|
241
|
+
-d '{"action": "reopen"}' \
|
|
242
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
#### Remove a label
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
curl -X POST \
|
|
249
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
250
|
+
-H "Content-Type: application/json" \
|
|
251
|
+
-d '{"action": "unlabel", "label": "rejected"}' \
|
|
252
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
#### Add any custom label
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
curl -X POST \
|
|
259
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
260
|
+
-H "Content-Type: application/json" \
|
|
261
|
+
-d '{"action": "label", "label": "high-priority"}' \
|
|
262
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### How to get the report ID
|
|
266
|
+
|
|
267
|
+
Use the [Fetching Reports API](#fetching-reports-by-user) to list reports. Each report has an `id` field — use that as `REPORT_ID`.
|
|
268
|
+
|
|
269
|
+
### How it works
|
|
270
|
+
|
|
271
|
+
1. End-user reports a bug via SDK -> GitHub issue created
|
|
272
|
+
2. You fetch reports via API or view on dashboard
|
|
273
|
+
3. Approve/reject/close via API or dashboard buttons
|
|
274
|
+
4. Labels and state sync directly to GitHub — GitHub is the source of truth
|
|
275
|
+
|
|
171
276
|
## Error Boundary
|
|
172
277
|
|
|
173
278
|
Wrap components to auto-capture React errors:
|