forked from cerc-io/snowballtools-base
Create new deployment on changing preview deployment to production (#61)
* Create new deployment when changing to production * Remove unnecessary todos * Move deployment id and url creation in database method * Display correct details in deployment dialog box * Rename relativeTime function to relativeTimeISO * Refactor resolver methods to service class * Refactor to move github app to service class --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import { Outlet, useLocation, useSearchParams } from 'react-router-dom';
|
||||
|
||||
import Stepper from '../../../../components/Stepper';
|
||||
import templateDetails from '../../../../assets/templates.json';
|
||||
import { GIT_TEMPLATE_LINK } from '../../../../constants';
|
||||
|
||||
const STEPPER_VALUES = [
|
||||
{ step: 1, route: '/projects/create/template', label: 'Create repository' },
|
||||
@@ -31,8 +32,11 @@ const CreateWithTemplate = () => {
|
||||
<div className="flex justify-between w-5/6 my-4 bg-gray-200 rounded-xl p-6">
|
||||
<div>^</div>
|
||||
<div className="grow">{template?.name}</div>
|
||||
{/* TODO: Get template Git link from DB */}
|
||||
<div>^snowball-tools/react-native-starter</div>
|
||||
<div>
|
||||
<a href={GIT_TEMPLATE_LINK} target="_blank" rel="noreferrer">
|
||||
cerc-io/test-progressive-web-app
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-3 w-5/6 p-6">
|
||||
<div>
|
||||
|
||||
@@ -50,7 +50,6 @@ const CreateRepo = () => {
|
||||
|
||||
const { addProject } = await client.addProject(orgSlug!, {
|
||||
name: `${gitRepo.data.owner!.login}-${gitRepo.data.name}`,
|
||||
// TODO: Get organization id from context or URL
|
||||
prodBranch: gitRepo.data.default_branch ?? 'main',
|
||||
repository: gitRepo.data.full_name,
|
||||
});
|
||||
@@ -95,8 +94,6 @@ const CreateRepo = () => {
|
||||
}
|
||||
}, [gitAccounts]);
|
||||
|
||||
// TODO: Get users and orgs from GitHub
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit(submitRepoHandler)}>
|
||||
<div className="mb-2">
|
||||
@@ -135,10 +132,7 @@ const CreateRepo = () => {
|
||||
name="account"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<AsyncSelect
|
||||
{...field}
|
||||
label={!field.value ? 'Select an account / Organization' : ''}
|
||||
>
|
||||
<AsyncSelect {...field}>
|
||||
{gitAccounts.map((account, key) => (
|
||||
<Option key={key} value={account}>
|
||||
^ {account}
|
||||
|
||||
Reference in New Issue
Block a user