forked from cerc-io/snowballtools-base
Fix default branch bug
This commit is contained in:
parent
c3b048d273
commit
939b1c40e8
@ -202,6 +202,7 @@ export class Service {
|
|||||||
subOrgId: params.subOrgId,
|
subOrgId: params.subOrgId,
|
||||||
ethAddress: params.ethAddress,
|
ethAddress: params.ethAddress,
|
||||||
isVerified: true,
|
isVerified: true,
|
||||||
|
turnkeyWalletId: params.turnkeyWalletId,
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.db.addUserOrganization({
|
await this.db.addUserOrganization({
|
||||||
|
@ -64,9 +64,16 @@ const CreateRepo = () => {
|
|||||||
return;
|
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!, {
|
const { addProject } = await client.addProject(orgSlug!, {
|
||||||
name: `${gitRepo.data.owner!.login}-${gitRepo.data.name}`,
|
name: `${gitRepo.data.owner!.login}-${gitRepo.data.name}`,
|
||||||
prodBranch: gitRepo.data.default_branch ?? 'main',
|
prodBranch,
|
||||||
repository: gitRepo.data.full_name,
|
repository: gitRepo.data.full_name,
|
||||||
// TODO: Set selected template
|
// TODO: Set selected template
|
||||||
template: 'webapp',
|
template: 'webapp',
|
||||||
|
Loading…
Reference in New Issue
Block a user