一键导入
github-integration
Guide for setting up and managing Docklift's GitHub App integration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guide for setting up and managing Docklift's GitHub App integration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Guide for server management, system APIs, backups, and maintenance operations.
Guide for developing features in the Vite + React Router frontend.
Guide to Docklift's automated release pipeline using semantic-release.
Guide for setting up, running, and developing the Docklift project.
Coolify/Dokploy-style managed databases with Dokku-style app linking.
Security patterns, guards, and best practices enforced across the Docklift codebase.
基于 SOC 职业分类
| name | GitHub Integration |
| description | Guide for setting up and managing Docklift's GitHub App integration. |
Docklift integrates with GitHub using a GitHub App. This allows for accessing private repositories and receiving webhook events (push) for auto-deployments.
backend/src/routes/github.tsbackend/src/services/git.ts (for cloning/pulling)startGithubInstallSession() / startGithubInstallAndNavigate() in frontend/src/lib/auth.tsDOCKLIFT_FRONTEND_URL — it must be the public dashboard URL, or
GitHub redirects the user somewhere unreachable.POST /api/github/manifest generates a GitHub App manifest./api/github/manifest/callback with a code.Settings table in the database.The manifest and install callbacks are public endpoints (GitHub calls them unauthenticated), so they are guarded by a one-time nonce instead:
data/github-setup/<state>.json
({ createdAt, returnUrl? } — return URL lives per state, not a global github_return_url).HttpOnly, SameSite=Lax cookie (docklift_github_state, Secure over HTTPS).timingSafeEqual, enforces TTL, and clears the used state — single-use./api/github/callbackUnsafe OAuth code→token exchange is removed. The route may still redirect installation_id to
/api/github/setup; otherwise it sends the user to Settings with github_error=legacy_oauth_disabled.
GET /api/github/branches?repo=owner/name&type=public|privateGET /api/github/tags?repo=owner/name&type=public|private — up to 500 tags, newest-firstcloneRepo / pullRepo accept branch or tag; pull fetches --tags and resets to tag when not a remote branchGET /api/github/repos (optional ?owner=login){ repositories, failedInstallations, fallbackSingle } — never silently
drop a failed install into an empty success list. fallbackSingle: true means only the
saved install was queried (installations list failed).check-installation must not overwrite a valid
saved install with installations[0] (that hid personal behind the last org).@login chip; search
filters the combined list (not a single-account badge). Toast on partial/fallback failures.POST /api/github/webhook (global — project matching is by repo URL, not /webhook/:projectId)./api/github/webhook.push events.github_webhook_secret to be configured — requests are rejected (401) if the secret is missing (fail closed).req.rawBody captured via express.json({ verify }) callback for accurate comparison.payload.deleted === true or payload.head_commit == null (deleted-branch pushes).Project database entries.auto_deploy: true.recentDeploys Map with 10-second cooldown per project (no global concurrency cap — careful with many projects on one repo).jsonwebtoken to sign a JWT with the stored Private Key (RS256).webhook_secret in DB matches GitHub. Check if auto_deploy is enabled for the project.Settings table)github_app_idgithub_private_keygithub_webhook_secretgithub_installation_id (Default installation ID)