From e3c20b8fd71ebf897a160be957a70abbfd0461a9 Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 16 Apr 2024 16:16:10 -0400 Subject: [PATCH 1/2] vault upgrade --- macros/marketplace/github/utils_udfs.yaml.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macros/marketplace/github/utils_udfs.yaml.sql b/macros/marketplace/github/utils_udfs.yaml.sql index 7fef6cdc..ade7595a 100644 --- a/macros/marketplace/github/utils_udfs.yaml.sql +++ b/macros/marketplace/github/utils_udfs.yaml.sql @@ -17,7 +17,7 @@ {'Authorization': 'Bearer {TOKEN}', 'X-GitHub-Api-Version': '2022-11-28'}, {}, - '_FSC_SYS/GITHUB' + 'vault/github/api' ) as response - name: {{ schema_name -}}.headers @@ -48,7 +48,7 @@ CONCAT_WS('/', 'https://api.github.com', route || '?') || utils.udf_urlencode(query), PARSE_JSON({{ schema_name -}}.headers()), {}, - '_FSC_SYS/GITHUB' + 'vault/github/api' ) - name: {{ schema_name -}}.post signature: @@ -65,7 +65,7 @@ CONCAT_WS('/', 'https://api.github.com', route), PARSE_JSON({{ schema_name -}}.headers()), data, - '_FSC_SYS/GITHUB' + 'vault/github/api' ) - name: {{ schema_name -}}.put signature: @@ -82,6 +82,6 @@ CONCAT_WS('/', 'https://api.github.com', route), PARSE_JSON({{ schema_name -}}.headers()), data, - '_FSC_SYS/GITHUB' + 'vault/github/api' ) {% endmacro %} \ No newline at end of file From b024188be4e9c6bc00ed77797ebdc92d351d620e Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 17 Apr 2024 16:04:53 -0400 Subject: [PATCH 2/2] IFF --- macros/marketplace/github/utils_udfs.yaml.sql | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/macros/marketplace/github/utils_udfs.yaml.sql b/macros/marketplace/github/utils_udfs.yaml.sql index ade7595a..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'}, {}, - 'vault/github/api' + 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()), {}, - 'vault/github/api' + 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, - 'vault/github/api' + 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, - 'vault/github/api' + IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api') ) {% endmacro %} \ No newline at end of file