import * as React from 'react'; import { ExpandableSection, FormSection, List, ListItem } from '@patternfly/react-core'; import { useField } from 'formik'; import { InputField, RadioGroupField, TextAreaField } from '~/shared/components/formik-base'; import HelpPopover from '../../../../components/HelpPopover'; import { useNamespace } from '../../../../shared/providers/Namespace'; import FormikParamsField from '../../../IntegrationTests/FormikParamsField'; import { ReleasePipelineLocation } from './form-utils'; const GitOptions: React.FC<{ required?: boolean }> = ({ required = false }) => { const [expanded, setExpanded] = React.useState(true); return ( <> setExpanded(e)} isIndented > ); }; export const RunReleasePipelineSection: React.FC = () => { const [{ value: pipelineLocation }] = useField('releasePipelineLocation'); const namespace = useNamespace(); return ( <> {pipelineLocation === ReleasePipelineLocation.current && ( <> } isRequired /> Parameters{' '} Add any of the following types of parameters: url: The URL of the repo to fetch and clone anonymously. repo: The repository to find the resource in. org: The organization to find the repository in. revision: Git revision to checkout a file from. pathInRepo: Where to find the file in the repository. } /> } /> )} {pipelineLocation === ReleasePipelineLocation.target && ( <> } isRequired /> )} ); };