Skip to content

[GH-P6] Repo picker : dépôts de l'installation, liaison projet, accès perdu - #241

Merged
bobdivx merged 1 commit into
mainfrom
feat/gh-app-p6-repo-picker
Oct 15, 2026
Merged

bobdivx merged 1 commit into
mainfrom
feat/gh-app-p6-repo-picker

Conversation

@bobdivx

@bobdivx bobdivx commented Oct 15, 2026

Copy link
Copy Markdown
Owner

P6: GitHub App repo picker

  • P6-01 GET /api/v1/github-app/repositories?q=&installation_id=&refresh=1:
    • Reads from the github_installation_repos cache. refresh=1 reloads it from GET /installation/repositories (per_page=100, all pages, 50 pages max) using the installation token.
    • Each installation gets a "Configurer l'accès aux dépôts" link (user or org settings).
    • Errors never include the token.
  • P6-02 GithubRepoPicker.tsx: search, "privé" badge, default branch, empty state with an install button, refresh.
    • Used in NewGithubAppWizard.tsx: picking a repo through the app links the new project (PUT /api/v1/projects/{uuid}/github-link) before its first deploy, with no PAT.
    • Used in ProjectGitPanel.tsx: re-link an existing project.
    • Linking fills github_installation_id, github_repo_id, the URL, and the branch (the chosen one, else the current one, else the default branch). It is refused if the repo is not accessible to the installation.
  • P6-03 GET /api/v1/projects/{uuid}/github-link returns lost=true when the project is linked but the repo has left the installation or the installation is suspended. In that case the Git panel shows an "Accès GitHub perdu" banner.

Tests

  • crates/github repos::tests: mocked pagination over 2 pages (130 repos); errors contain no token.
  • github_repos::tests: filtering and sorting; configure URL for a user vs an org.
  • GithubRepoPicker.test.tsx: empty state, search, private badge, selection, refresh.

@bobdivx
bobdivx merged commit 04aab67 into main Oct 15, 2026
4 checks passed
@bobdivx
bobdivx deleted the feat/gh-app-p6-repo-picker branch October 15, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant