Skip to content

Instantly share code, notes, and snippets.

@metacoma
Created March 29, 2024 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metacoma/9048b4939b67d5374e754833d1accfe4 to your computer and use it in GitHub Desktop.
Save metacoma/9048b4939b67d5374e754833d1accfe4 to your computer and use it in GitHub Desktop.
kanbanflow create task
#!/usr/bin/env bash
# example usage
# echo "Task description" | ./this_script.sh
set -x
. ./.env
description="$(cat | jq -Rs '.')"
planning_column=`curl https://kanbanflow.com/api/v1/board?apiToken=${API_TOKEN} | jq -r '.columns[] | select(.name == "In progress") | .uniqueId'`
echo ${planning_column}
title="Planning `date '+%d %B'`"
cat<<EOF | jq | curl -vvvv -X POST https://kanbanflow.com/api/v1/tasks?apiToken=${API_TOKEN} -H "Content-type: application/json" -d @-
{
"name" : `echo ${title} | jq -Rs .`,
"color" : "magenta",
"subTasks": [
{ "name": "pomodoro table" },
{ "name": "previos day" },
{ "name": "day achieve" }
],
"columnId": "${planning_column}",
"labels": [
{"name": "PLANNING", "pinned": true}
],
"description": $description
}
EOF
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment