Skip to content

Instantly share code, notes, and snippets.

@tomdavidson
Last active September 3, 2019 21:31
Show Gist options
  • Save tomdavidson/a4aa5fb83c5e476f12663b7b8e1b5dc7 to your computer and use it in GitHub Desktop.
Save tomdavidson/a4aa5fb83c5e476f12663b7b8e1b5dc7 to your computer and use it in GitHub Desktop.
tf to create children teams after looking up parent ids
## Existing list of teams with members list:
"0" = {
"description" = "No one cared enough to add a description to this team"
"members" = [
{
"role" = "maintainer"
"username" = "bob"
},
{
"username" = "jon"
},
]
"name" = "Engineering"
"privacy" = "closed"
}
"1" = {
"description" = "No one cared enough to add a description to this team"
"members" = {}
"name" = "core"
"parent" = "Engineering"
"privacy" = "closed"
}
## and I want to get a new list such as:
"0" = {
"teamname" = "Engineering"
"username" = "bob"
"role" = "maintainer"
}
"1" = {
"teamname" = "Engineering"
"username" = "jon"
"role" = "member"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment