diff --git a/.notes/note-1769113417187-fdw7f9pbd.json b/.notes/note-1769113417187-fdw7f9pbd.json index 376f253230..b404ac3f7a 100644 --- a/.notes/note-1769113417187-fdw7f9pbd.json +++ b/.notes/note-1769113417187-fdw7f9pbd.json @@ -1,8 +1,8 @@ { "id": "note-1769113417187-fdw7f9pbd", "title": "AutoTicket", - "content": " New JSON Endpoints (routers/web/repo/issue_json.go)\n\n All endpoints support vault token authentication for private repos.\n\n | Endpoint | Method | Description |\n |--------------------------------------------|--------|---------------------------------|\n | /{owner}/{repo}/issues/submit.json | POST | Submit a new issue |\n | /{owner}/{repo}/issues/{index}/status.json | GET | Get issue status |\n | /{owner}/{repo}/issues/external/{id}.json | GET | List issues by external user ID |\n\n Request example (submit):\n POST /owner/repo/issues/submit.json\n Authorization: Bearer gvt_xxx\n {\n \"title\": \"Bug report\",\n \"body\": \"Description...\",\n \"external_user_id\": \"user_12345\",\n \"external_source\": \"myapp-ios\",\n \"labels\": [\"bug\"]\n }\n\n Response example:\n {\n \"number\": 42,\n \"title\": \"Bug report\",\n \"state\": \"open\",\n \"external_user_id\": \"user_12345\",\n \"html_url\": \"https://...\"\n }", + "content": " New Endpoints: Issue JSON API for App Integration\n\n Simple URLs - no /api/v1 prefix needed! Perfect for in-app bug reporting and feedback.\n\n Endpoints\n\n | Endpoint | Method | Description |\n |---------------------------------------------------------|--------|------------------------------|\n | /{owner}/{repo}/issues/submit.json | POST | Submit a new issue |\n | /{owner}/{repo}/issues/{number}/status.json | GET | Get issue status |\n | /{owner}/{repo}/issues/external/{external_user_id}.json | GET | List issues by external user |\n\n Authentication\n\n - Public repos: No authentication required for GET, user session or vault token for POST\n - Private repos: Vault token via Authorization: Bearer gvt_xxx\n\n Rate Limiting\n\n All endpoints include X-RateLimit-Exempt: app-integration header.\n\n ---\n POST /issues/submit.json - Submit an Issue\n\n curl -X POST https://gitcaddy.com/myorg/myapp/issues/submit.json \\\n -H \"Authorization: Bearer gvt_xxx\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"title\": \"App crashes on startup\",\n \"body\": \"Steps to reproduce:\\n1. Open app\\n2. Click settings\\n3. Crash\",\n \"labels\": [\"bug\", \"crash\"],\n \"external_user_id\": \"user_12345\",\n \"external_source\": \"myapp-ios\"\n }'\n\n Request Body:\n\n | Field | Type | Required | Description |\n |------------------|----------|----------|---------------------------------------------|\n | title | string | Yes | Issue title |\n | body | string | No | Issue description (markdown supported) |\n | labels | string[] | No | Label names to apply |\n | external_user_id | string | No | Your app's user identifier |\n | external_source | string | No | App/platform identifier (e.g., \"myapp-ios\") |\n\n Response (201 Created):\n\n {\n \"number\": 42,\n \"title\": \"App crashes on startup\",\n \"body\": \"Steps to reproduce...\",\n \"state\": \"open\",\n \"labels\": [\"bug\", \"crash\"],\n \"comments_count\": 0,\n \"external_user_id\": \"user_12345\",\n \"external_source\": \"myapp-ios\",\n \"created_at\": \"2026-01-22T10:30:00Z\",\n \"updated_at\": \"2026-01-22T10:30:00Z\",\n \"html_url\": \"https://gitcaddy.com/myorg/myapp/issues/42\"\n }\n\n ---\n GET /issues/{number}/status.json - Check Issue Status\n\n curl https://gitcaddy.com/myorg/myapp/issues/42/status.json \\\n -H \"Authorization: Bearer gvt_xxx\"\n\n Response:\n\n {\n \"number\": 42,\n \"title\": \"App crashes on startup\",\n \"body\": \"Steps to reproduce...\",\n \"state\": \"closed\",\n \"labels\": [\"bug\", \"crash\", \"fixed\"],\n \"comments_count\": 5,\n \"external_user_id\": \"user_12345\",\n \"external_source\": \"myapp-ios\",\n \"created_at\": \"2026-01-22T10:30:00Z\",\n \"updated_at\": \"2026-01-22T14:20:00Z\",\n \"closed_at\": \"2026-01-22T14:20:00Z\",\n \"html_url\": \"https://gitcaddy.com/myorg/myapp/issues/42\"\n }\n\n ---\n GET /issues/external/{external_user_id}.json - List User's Issues\n\n Retrieve all issues submitted by a specific external user.\n\n curl https://gitcaddy.com/myorg/myapp/issues/external/user_12345.json \\\n -H \"Authorization: Bearer gvt_xxx\"\n\n Response:\n\n {\n \"issues\": [\n {\n \"number\": 42,\n \"title\": \"App crashes on startup\",\n \"state\": \"closed\",\n \"labels\": [\"bug\", \"fixed\"],\n \"comments_count\": 5,\n \"external_user_id\": \"user_12345\",\n \"created_at\": \"2026-01-22T10:30:00Z\",\n \"updated_at\": \"2026-01-22T14:20:00Z\",\n \"closed_at\": \"2026-01-22T14:20:00Z\",\n \"html_url\": \"https://gitcaddy.com/myorg/myapp/issues/42\"\n },\n {\n \"number\": 38,\n \"title\": \"Feature request: dark mode\",\n \"state\": \"open\",\n \"labels\": [\"enhancement\"],\n \"comments_count\": 2,\n \"external_user_id\": \"user_12345\",\n \"created_at\": \"2026-01-20T09:00:00Z\",\n \"updated_at\": \"2026-01-21T11:00:00Z\",\n \"html_url\": \"https://gitcaddy.com/myorg/myapp/issues/38\"\n }\n ],\n \"total_count\": 2\n }\n\n ---\n UI Integration: External User Filter\n\n The Issues tab supports filtering by external user ID:\n\n https://gitcaddy.com/myorg/myapp/issues?external_user=user_12345\n\n When active, a filter label appears that can be cleared with the X button.\n\n ---\n Example: In-App Integration\n\n // Submit bug report from your app\n async function submitBugReport(title, description, userId) {\n const response = await fetch(\n 'https://gitcaddy.com/myorg/myapp/issues/submit.json',\n {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer gvt_xxx',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n title: title,\n body: description,\n labels: ['bug', 'user-reported'],\n external_user_id: userId,\n external_source: 'myapp-web'\n })\n }\n );\n return response.json();\n }\n\n // Check status of user's tickets\n async function getUserTickets(userId) {\n const response = await fetch(\n `https://gitcaddy.com/myorg/myapp/issues/external/${userId}.json`,\n {\n headers: { 'Authorization': 'Bearer gvt_xxx' }\n }\n );\n return response.json();\n }\n\n ---", "createdAt": 1769113417184, - "updatedAt": 1769113430931, + "updatedAt": 1769113908880, "tags": [] } \ No newline at end of file diff --git a/.notes/note-1769113439411-asd5qtp9l.json b/.notes/note-1769113439411-asd5qtp9l.json index 1e11ad6147..cd6818609c 100644 --- a/.notes/note-1769113439411-asd5qtp9l.json +++ b/.notes/note-1769113439411-asd5qtp9l.json @@ -1,8 +1,8 @@ { "id": "note-1769113439411-asd5qtp9l", "title": "AutoRelease", - "content": " New Endpoint: /{owner}/{repo}/releases/latest.json\n\n Simple URL - no /api/v1 prefix needed!\n\n Channel Support\n\n | Channel | Description |\n |--------------------|-------------------------------------|\n | stable (default) | Latest non-prerelease release |\n | prerelease or beta | Latest prerelease only |\n | any or all | Latest release regardless of status |\n\n Usage Examples\n\n # Get latest stable release\n curl https://gitcaddy.com/myorg/myapp/releases/latest.json\n\n # Get latest beta/prerelease\n curl https://gitcaddy.com/myorg/myapp/releases/latest.json?channel=beta\n\n # Get absolute latest (stable or prerelease)\n curl https://gitcaddy.com/myorg/myapp/releases/latest.json?channel=any\n\n Response Format\n\n {\n \"tag_name\": \"v1.2.3\",\n \"name\": \"Version 1.2.3\",\n \"body\": \"Release notes here...\",\n \"draft\": false,\n \"prerelease\": false,\n \"created_at\": \"2026-01-20T10:30:00Z\",\n \"published_at\": \"2026-01-20T10:30:00Z\",\n \"html_url\": \"https://gitcaddy.com/myorg/myapp/releases/tag/v1.2.3\",\n \"tarball_url\": \"https://gitcaddy.com/myorg/myapp/archive/v1.2.3.tar.gz\",\n \"zipball_url\": \"https://gitcaddy.com/myorg/myapp/archive/v1.2.3.zip\",\n \"assets\": [\n {\n \"name\": \"myapp-windows.exe\",\n \"size\": 12345678,\n \"download_count\": 1234,\n \"browser_download_url\": \"https://gitcaddy.com/myorg/myapp/releases/download/v1.2.3/myapp-windows.exe\"\n }\n ]\n }", + "content": " New Endpoint: /{owner}/{repo}/releases/latest.json\n\n Simple URL - no /api/v1 prefix needed!\n\n Channel Support\n\n | Channel | Description |\n |--------------------|-------------------------------------|\n | stable (default) | Latest non-prerelease release |\n | prerelease or beta | Latest prerelease only |\n | any or all | Latest release regardless of status |\n\n Authentication\n\n - Public repos: No authentication required\n - Private repos: Vault token via Authorization: Bearer gvt_xxx\n\n Rate Limiting\n\n Endpoint includes X-RateLimit-Exempt: update-check header for app update checks.\n\n Usage Examples\n\n # Get latest stable release\n curl https://gitcaddy.com/myorg/myapp/releases/latest.json\n\n # Get latest beta/prerelease\n curl https://gitcaddy.com/myorg/myapp/releases/latest.json?channel=beta\n\n # Get absolute latest (stable or prerelease)\n curl https://gitcaddy.com/myorg/myapp/releases/latest.json?channel=any\n\n # Private repo with vault token\n curl -H \"Authorization: Bearer gvt_xxx\" \\\n https://gitcaddy.com/myorg/private-app/releases/latest.json\n\n Response Format\n\n {\n \"repo_url\": \"https://gitcaddy.com/myorg/myapp\",\n \"repo_name\": \"myapp\",\n \"repo_full_name\": \"myorg/myapp\",\n \"repo_display_name\": \"My Application\",\n \"repo_description\": \"A great app for doing things\",\n \"tag_name\": \"v1.2.3\",\n \"name\": \"Version 1.2.3\",\n \"body\": \"Release notes here...\",\n \"draft\": false,\n \"prerelease\": false,\n \"channel\": \"stable\",\n \"created_at\": \"2026-01-20T10:30:00Z\",\n \"published_at\": \"2026-01-20T10:30:00Z\",\n \"html_url\": \"https://gitcaddy.com/myorg/myapp/releases/tag/v1.2.3\",\n \"tarball_url\": \"https://gitcaddy.com/myorg/myapp/archive/v1.2.3.tar.gz\",\n \"zipball_url\": \"https://gitcaddy.com/myorg/myapp/archive/v1.2.3.zip\",\n \"assets\": [\n {\n \"name\": \"myapp-windows.exe\",\n \"size\": 15728640,\n \"download_count\": 1234,\n \"browser_download_url\": \"https://gitcaddy.com/myorg/myapp/releases/download/v1.2.3/myapp-windows.exe\"\n }\n ]\n }\n\n UI Integration\n\n A JSON button appears on the Releases page (header and per-release) linking to this endpoint.", "createdAt": 1769113439408, - "updatedAt": 1769113463716, + "updatedAt": 1769113860499, "tags": [] } \ No newline at end of file