Context
#7590 decided APR customers get an optional, explicit transfer-to-their-own-account flow using GitHub's standard repository transfer mechanism, rather than owning the repo from day one. No code exists yet for this.
Requirements
Add a function that initiates a GitHub repository transfer from the loopover-controlled org to a target GitHub account, using the GitHub REST API's "Transfer a repository" endpoint (POST /repos/{owner}/{repo}/transfer) with the target account's login as new_owner. GitHub's transfer flow requires the recipient to accept via a confirmation email within a time window and does not complete synchronously — this function's job is to initiate the transfer and return whatever status GitHub's API response provides; it must not assume or report the transfer as complete just because the API call succeeded.
⚠️ This issue does not cover: detecting when a pending transfer is accepted/expires (separate follow-on concern, not scoped here), any UI for the customer to request a transfer, or anything about when a transfer should be offered (a product/UX question, not this issue's job). Deliverable is exactly: given a repo and a target account login, call the transfer endpoint and return its response, tested.
Deliverables
Test Coverage Requirements
Standard 99%+ Codecov patch target for src/**; mock the GitHub API in tests, no live transfer calls.
Expected Outcome
A tested, reusable way to initiate a repo transfer to a customer's account, correctly modeling that GitHub transfers are asynchronous and acceptance-gated rather than instantaneous.
Links & Resources
Context
#7590 decided APR customers get an optional, explicit transfer-to-their-own-account flow using GitHub's standard repository transfer mechanism, rather than owning the repo from day one. No code exists yet for this.
Requirements
Add a function that initiates a GitHub repository transfer from the loopover-controlled org to a target GitHub account, using the GitHub REST API's "Transfer a repository" endpoint (
POST /repos/{owner}/{repo}/transfer) with the target account's login asnew_owner. GitHub's transfer flow requires the recipient to accept via a confirmation email within a time window and does not complete synchronously — this function's job is to initiate the transfer and return whatever status GitHub's API response provides; it must not assume or report the transfer as complete just because the API call succeeded.Deliverables
Test Coverage Requirements
Standard 99%+ Codecov patch target for
src/**; mock the GitHub API in tests, no live transfer calls.Expected Outcome
A tested, reusable way to initiate a repo transfer to a customer's account, correctly modeling that GitHub transfers are asynchronous and acceptance-gated rather than instantaneous.
Links & Resources
POST /repos/{owner}/{repo}/transfer)