MCPcopy Create free account
hub / github.com/bytebase/bytebase / upsertReviewConfigTag

Function upsertReviewConfigTag

frontend/src/react/stores/sqlReview.ts:28–48  ·  view source on GitHub ↗
(
  resources: string[],
  configName: string
)

Source from the content-addressed store, hash-verified

26 `${resourcePath}/policies/${PolicyType[PolicyType.TAG].toLowerCase()}`;
27
28const 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
50const removeReviewConfigTag = async (resources: string[]) => {
51 await Promise.all(

Callers 1

sqlReview.tsFile · 0.85

Calls 1

upsertPolicyMethod · 0.80

Tested by

no test coverage detected