fix pull_items + add discord_webhook

This commit is contained in:
Ruben Fiszel
2022-08-04 18:33:09 +02:00
parent c5ccb00dbf
commit 50c38dbb6c
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -8,6 +8,7 @@ for item in ${RT[@]}; do
body=$(curl -s -H "accept: application/json" https://hub.windmill.dev/resource_types/${id}/${name})
jq -r '.resource_type.schema' <<< "$body" > ./tmp
description=$(jq -r '.resource_type.description' <<< "$body")
description=$(echo -E $description)
echo "{\"workspace_id\": \"starter\", \"name\": \"$name\", \"schema\": $(cat ./tmp), \"description\": \"$description\"} " | jq . > community/resource_types/${name}.json
rm ./tmp
done
@@ -0,0 +1,16 @@
{
"workspace_id": "starter",
"name": "discord_webhook",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"webhook_url": {
"type": "string",
"description": "The webhook url"
}
},
"required": [],
"type": "object"
},
"description": "Discord webhook url to send messages. See: <https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks>"
}