diff --git a/macros/marketplace/github/utils_udfs.yaml.sql b/macros/marketplace/github/utils_udfs.yaml.sql index 7fef6cdc..dfc93251 100644 --- a/macros/marketplace/github/utils_udfs.yaml.sql +++ b/macros/marketplace/github/utils_udfs.yaml.sql @@ -17,7 +17,8 @@ {'Authorization': 'Bearer {TOKEN}', 'X-GitHub-Api-Version': '2022-11-28'}, {}, - '_FSC_SYS/GITHUB' + IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api') + ) as response - name: {{ schema_name -}}.headers @@ -48,7 +49,7 @@ CONCAT_WS('/', 'https://api.github.com', route || '?') || utils.udf_urlencode(query), PARSE_JSON({{ schema_name -}}.headers()), {}, - '_FSC_SYS/GITHUB' + IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api') ) - name: {{ schema_name -}}.post signature: @@ -65,7 +66,7 @@ CONCAT_WS('/', 'https://api.github.com', route), PARSE_JSON({{ schema_name -}}.headers()), data, - '_FSC_SYS/GITHUB' + IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api') ) - name: {{ schema_name -}}.put signature: @@ -82,6 +83,6 @@ CONCAT_WS('/', 'https://api.github.com', route), PARSE_JSON({{ schema_name -}}.headers()), data, - '_FSC_SYS/GITHUB' + IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api') ) {% endmacro %} \ No newline at end of file