|
|
@@ -46,6 +46,9 @@ const ConnectNewRepo: React.FC = () => {
|
|
|
// Disable new comments data
|
|
|
const [isNewCommentsDisabled, setIsNewCommentsDisabled] = useState(false);
|
|
|
|
|
|
+ // Use custom namespaces
|
|
|
+ const [useCustomNamespaces, setUseCustomNamespaces] = useState(false);
|
|
|
+
|
|
|
useEffect(() => {
|
|
|
api
|
|
|
.listEnvironments<Environment[]>(
|
|
|
@@ -118,6 +121,8 @@ const ConnectNewRepo: React.FC = () => {
|
|
|
mode: enableAutomaticDeployments ? "auto" : "manual",
|
|
|
disable_new_comments: isNewCommentsDisabled,
|
|
|
git_repo_branches: selectedBranches,
|
|
|
+ custom_namespaces: useCustomNamespaces,
|
|
|
+ namespace_annotations: {},
|
|
|
},
|
|
|
{
|
|
|
project_id: currentProject.id,
|
|
|
@@ -233,6 +238,28 @@ const ConnectNewRepo: React.FC = () => {
|
|
|
showLoading={isLoadingBranches}
|
|
|
/>
|
|
|
|
|
|
+ <Heading>Custom namespaces</Heading>
|
|
|
+ <Helper>
|
|
|
+ By default, Porter chooses a templated namespace for every new GitHub PR.
|
|
|
+ When this is enabled, you can choose a custom namespace of your choice in
|
|
|
+ the GitHub action workflow file that we create for you.
|
|
|
+ </Helper>
|
|
|
+ <CheckboxWrapper>
|
|
|
+ <CheckboxRow
|
|
|
+ label="Use custom namespaces"
|
|
|
+ checked={useCustomNamespaces}
|
|
|
+ toggle={() => setUseCustomNamespaces(!useCustomNamespaces)}
|
|
|
+ wrapperStyles={{
|
|
|
+ disableMargin: true,
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <DocsHelper
|
|
|
+ disableMargin
|
|
|
+ tooltipText="When checked, it is up to you to choose a namespace for every new deployment."
|
|
|
+ placement="top-end"
|
|
|
+ />
|
|
|
+ </CheckboxWrapper>
|
|
|
+
|
|
|
<ActionContainer>
|
|
|
<SaveButton
|
|
|
text="Add repository"
|