Merge pull request #828 from tdurieux/fix/public-repository-app-access

fix: allow GitHub App access to public repositories without installation
This commit is contained in:
Thomas Durieux authored and GitHub committed 2026-09-13 19:06:25 +02:00
commit 8abdaf7119
8 files changed
+235 -16

No files matched your search

+1 -1
View File
@@ -497,7 +497,7 @@ router.post(
}
if (repoUpdate.fullName !== repo.model.source.repositoryName && user.id !== repo.owner.id) throw appError("not_owner", 403);
const sourceAccess = repo.model.githubAccess?.kind === "github-app" && repoUpdate.fullName === repo.model.source.repositoryName
? { token: await boundAppToken(repo.owner.id, repo.model.githubAccess), binding: repo.model.githubAccess }
? { token: await boundAppToken(repo.owner.id, repo.model.githubAccess, repo.model.source.repositoryName), binding: repo.model.githubAccess }
: await selectRepositoryAccess(repo.owner.id, `${parsedRepository.owner}/${parsedRepository.name}`, repo.model.githubAccess?.kind || "oauth");
const repository = await getRepositoryFromGitHub({
accessToken: sourceAccess.token,