feat(secret-approval): implemented the new policy based approval system bare version

This commit is contained in:
Akhil Mohan
2023-10-05 20:34:50 +05:30
parent fc43511f5d
commit 63588b4e44
27 changed files with 1033 additions and 165 deletions
@@ -43,6 +43,7 @@ type Props = {
environment: string;
secretPath: string;
secrets?: DecryptedSecret[];
isProtectedBranch?: boolean;
};
export const SecretDropzone = ({
@@ -52,7 +53,8 @@ export const SecretDropzone = ({
decryptFileKey,
environment,
secretPath,
secrets = []
secrets = [],
isProtectedBranch = false
}: Props): JSX.Element => {
const { t } = useTranslation();
const [isDragActive, setDragActive] = useToggle();
@@ -195,7 +197,9 @@ export const SecretDropzone = ({
handlePopUpClose("overlapKeyWarning");
createNotification({
type: "success",
text: "Successfully uploaded secrets"
text: isProtectedBranch
? "Uploaded changes have been send for review"
: "Successfully uploaded secrets"
});
} catch (err) {
console.log(err);