Fix default branch bug
This commit is contained in:
parent
c3b048d273
commit
939b1c40e8
@ -202,6 +202,7 @@ export class Service {
|
||||
subOrgId: params.subOrgId,
|
||||
ethAddress: params.ethAddress,
|
||||
isVerified: true,
|
||||
turnkeyWalletId: params.turnkeyWalletId,
|
||||
});
|
||||
|
||||
await this.db.addUserOrganization({
|
||||
|
@ -64,9 +64,16 @@ const CreateRepo = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
// Refetch to always get correct default branch
|
||||
const templateRepo = await octokit.rest.repos.get({
|
||||
owner: template.repoFullName.split('/')[0],
|
||||
repo: template.repoFullName.split('/')[1],
|
||||
});
|
||||
const prodBranch = templateRepo.data.default_branch ?? 'main';
|
||||
|
||||
const { addProject } = await client.addProject(orgSlug!, {
|
||||
name: `${gitRepo.data.owner!.login}-${gitRepo.data.name}`,
|
||||
prodBranch: gitRepo.data.default_branch ?? 'main',
|
||||
prodBranch,
|
||||
repository: gitRepo.data.full_name,
|
||||
// TODO: Set selected template
|
||||
template: 'webapp',
|
||||
|
Loading…
Reference in New Issue
Block a user