File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
backend/src/routes/teams/deploy Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -564,8 +564,9 @@ export default async function deployGitHubRoutes(server: FastifyInstance) {
564564 // Get repository details for default branch
565565 const { data : repoData } = await octokit . repos . get ( { owner, repo } ) ;
566566
567- // Check if repository is empty
568- if ( repoData . size === 0 || ! repoData . default_branch ) {
567+ // Check if repository is empty (only check for default branch, not size)
568+ // Note: GitHub's size field is in KB and can be 0 for very small repos
569+ if ( ! repoData . default_branch ) {
569570 const errorResponse : ErrorResponse = {
570571 success : false ,
571572 error : `Repository ${ owner } /${ repo } is empty. Please push code to the repository before deploying.`
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export class DeploymentService {
108108 repo : string
109109 ) : Promise < BranchesResponse > {
110110 const response = await fetch (
111- `${ this . baseUrl } /api/teams/${ teamId } /deploy/github/repositories/${ owner } /${ repo } /branches` ,
111+ `${ this . baseUrl } /api/teams/${ teamId } /deploy/github/repositories/${ encodeURIComponent ( owner ) } /${ encodeURIComponent ( repo ) } /branches` ,
112112 {
113113 method : 'GET' ,
114114 credentials : 'include'
You can’t perform that action at this time.
0 commit comments