( resources: string[], configName: string )
| 26 | `${resourcePath}/policies/${PolicyType[PolicyType.TAG].toLowerCase()}`; |
| 27 | |
| 28 | const upsertReviewConfigTag = async ( |
| 29 | resources: string[], |
| 30 | configName: string |
| 31 | ) => { |
| 32 | await Promise.all( |
| 33 | resources.map((resourcePath) => |
| 34 | useAppStore.getState().upsertPolicy({ |
| 35 | parentPath: resourcePath, |
| 36 | policy: { |
| 37 | type: PolicyType.TAG, |
| 38 | policy: { |
| 39 | case: "tagPolicy", |
| 40 | value: createProto(TagPolicySchema, { |
| 41 | tags: { [reviewConfigTagName]: configName }, |
| 42 | }), |
| 43 | }, |
| 44 | }, |
| 45 | }) |
| 46 | ) |
| 47 | ); |
| 48 | }; |
| 49 | |
| 50 | const removeReviewConfigTag = async (resources: string[]) => { |
| 51 | await Promise.all( |
no test coverage detected