# shellcheck shell=dash disable=SC2034,SC2154
# https://gitea.com/api/swagger#/issue/issueDelete
___x_cmd_fjo_issue_close(){
    param:scope     ___x_cmd_fjo
    param:dsl       '
options:
    #1              "The number that identifies the issue."        <>:number
    --repo|-r       "<owner_path>/<repo_path>"                     <>:RepoName
    --json|-j       "output json data"
'
    param:run

    local state=closed

    ___x_cmd_fjo_param_init_owner_repo
    ___x_cmd_fjo_curl patch "/repos/${owner_repo}/issues/${1}" -- state | ___x_cmd_fjo_issue____ui_handler Close
}

