feat(draft): resolve a repo's GitHub App by source_id, not the only-App guess (#72 item 8) #82
No reviewers
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:apply
scope:capture
scope:coolify-api
scope:fleet
scope:manifest
scope:secrets
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/cast#82
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/github-app-binding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #72 item 8 — "resolve GitHub App binding via
source_id↔GET /github-appsinstead of the only-App heuristic."The claim this refutes
inventory --emit-draftwrote thegithub_appsbinding by guessing: with exactly one App on the instance it bound every repo to it ("no other it could be"), and with none or several it left a REVIEW marker on all of them — because "nothing Coolify returns about an application says which App cloned it."That claim is false at v4.1.2, verified at the source:
source_id/source_type, andremoveSensitiveDatahides neither (ApplicationsController.php:39-58).environment_detailsreturns applications un-stripped (ProjectController.php:167).GET /github-appsreturns each App'sidandname— onlyclient_secret/webhook_secretare hidden (GithubController::list_github_apps+removeSensitiveData).So the guess was both unnecessary and, on a single-App instance, silently wrong for any public repo (cloned without a GitHub App, but bound to the one App anyway).
What changed
The draft now matches
source_id→ Appid: each repo binds to the App its application names. Fallbacks preserved and made honest:GithubAppsource_type) resolves to nothing → REVIEW marker (instead of a wrong bind).source_idthat collides with an App id but carries a non-GithubAppsource_typeis not mistaken for one.The biggest gain is the multi-App instance the old heuristic could not handle at all — it wrote REVIEW on every repo; the lookup resolves each.
semantics.md, the emittedenvironments.yamlheader, and theNO_API_COVERAGErow are corrected to match (the #51 arc: a limitation filed as a defect gets fixed).Tests
draft.test.ts: binds each repo to itssource_id's App with several Apps present; REVIEW for a public repo; no bind on an id-collision with a non-GithubApp source.draft-cli.test.ts: end-to-end — the incubator app (source_id: 7) resolves tohdb-coolify, the third-party public repo gets a REVIEW marker.npm run checkclean · 511 tests pass (npm run build && npm test, as CI runs).🤖 Generated with Claude Code