mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 18:41:21 +00:00
Modify case where integration bot was authorized but user didn't finish inputting their PAT -> should result in not sharing keys with bot
This commit is contained in:
@@ -19,7 +19,6 @@ type Props = {
|
||||
isOpen: boolean;
|
||||
closeModal: () => void;
|
||||
selectedIntegrationOption: IntegrationOption | null;
|
||||
handleBotActivate: () => Promise<void>;
|
||||
integrationOptionPress: (integrationOption: IntegrationOption) => void;
|
||||
};
|
||||
|
||||
@@ -27,20 +26,16 @@ const ActivateBotDialog = ({
|
||||
isOpen,
|
||||
closeModal,
|
||||
selectedIntegrationOption,
|
||||
handleBotActivate,
|
||||
integrationOptionPress
|
||||
}: Props) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const submit = async () => {
|
||||
try {
|
||||
// 1. activate bot
|
||||
await handleBotActivate();
|
||||
|
||||
// type check
|
||||
if (!selectedIntegrationOption) return;
|
||||
|
||||
// 2. start integration or probe for PAT
|
||||
// start integration or probe for PAT
|
||||
integrationOptionPress(selectedIntegrationOption);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
@@ -52,7 +52,6 @@ const IntegrationAccessTokenDialog = ({
|
||||
<div>
|
||||
<Transition appear show={isOpen} as={Fragment}>
|
||||
<Dialog as="div" className="relative z-10" onClose={() => {
|
||||
console.log('onClose');
|
||||
closeModal();
|
||||
}}>
|
||||
<Transition.Child
|
||||
|
||||
@@ -30,8 +30,8 @@ const ProjectIntegrationSection = ({
|
||||
setBot,
|
||||
environments = [],
|
||||
handleDeleteIntegration
|
||||
}: Props) =>
|
||||
integrations.length > 0 ? (
|
||||
}: Props) => {
|
||||
return integrations.length > 0 ? (
|
||||
<div className="mb-12">
|
||||
<div className="flex flex-col justify-between items-start mx-4 mb-4 mt-6 text-xl max-w-5xl px-2">
|
||||
<h1 className="font-semibold text-3xl">Current Integrations</h1>
|
||||
@@ -40,7 +40,6 @@ const ProjectIntegrationSection = ({
|
||||
</p>
|
||||
</div>
|
||||
{integrations.map((integration: Integration) => {
|
||||
console.log('IntegrationSection integration: ', integration);
|
||||
return (
|
||||
<IntegrationTile
|
||||
key={`integration-${integration._id.toString()}`}
|
||||
@@ -58,5 +57,6 @@ const ProjectIntegrationSection = ({
|
||||
) : (
|
||||
<div />
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
export default ProjectIntegrationSection;
|
||||
Reference in New Issue
Block a user