# shellcheck shell=bash disable=SC2034,SC2154
# https://gitea.com/api/swagger#/repository/repoAddTeam
___x_cmd_fjo_repo_team_add() {
    param:scope     ___x_cmd_fjo
    param:dsl       <<A
options:
    --repo|-r       "<owner_path>/<repo_path>"      <>:RepoName=""
    --team          "team name"                     <>
    --json|-j       "output json data"
A
    param:run
    ___x_cmd_fjo_param_init_owner_repo

    local gen_fjo_json
    gen_fjo_json="$(param:option2json )"

    ___x_cmd_fjo_curl put "/repos/${owner_repo}/teams/${team}" "gen_fjo_json" | ___x_cmd_fjo_repo_team____ui_handler Add
}
