# shellcheck shell=sh
# shellcheck disable=SC2039,3043
# Section : attachment

# NOTE: use repo release attachment need gitee v8 api
# The v8 api token need use enterprice app generate

___x_cmd_gt_repo_release_attachment(){
    param:subcmd ___x_cmd_gt_repo_release_attachment            \
        ls              "List release's attachment"             \
        create          "Upload attachment"                     \
        rm              "Remove attachment"
    param:subcmd:try
    param:run

    ___x_cmd_gt_repo_release_attachment _param_help_doc
    return 1
}

# Section: main
___x_cmd_gt_repo_release_attachment_ls(){
    param:scope     ___x_cmd_gt
    param:dsl    '
options:
    #1|--release        "Release ID"                <>:NatureNumber
'
    param:run

    ______x_cmd_gt_repo_release_init_owner_repo_and_release
}

# Provide multiple files
___x_cmd_gt_repo_release_attachment_create(){
    param:scope     ___x_cmd_gt
    param:dsl    '
options:
    #1|--release        "Release ID"                <>:NatureNumber
'
    param:run

    ______x_cmd_gt_repo_release_init_owner_repo_and_release
}

# Delete the file in attachment list
___x_cmd_gt_repo_release_attachment_rm(){
    param:scope     ___x_cmd_gt
    param:dsl    '
options:
    #1|--release        "Release ID"                <>:NatureNumber
'
    param:run

    ______x_cmd_gt_repo_release_init_owner_repo_and_release
}

# EndSection
