diff --git a/src/nu-git-manager-sugar/github.nu b/src/nu-git-manager-sugar/github.nu index ee9295a7..c801a441 100644 --- a/src/nu-git-manager-sugar/github.nu +++ b/src/nu-git-manager-sugar/github.nu @@ -182,11 +182,7 @@ export def "gm gh query-releases" [ --page-size: int = 100 # the size of each page --no-gh # force to use `http get` instead of `gh` ]: nothing -> table, node_id: string, tag_name: string, target_commitish: string, name: string, draft: bool, prerelease: bool, created_at: string, published_at: string, assets: list, tarball_url: string, zipball_url: string, body: string, reactions: record, mentions_count: int> { - if $no_gh { - gm gh query-api $"/repos/($repo)/releases" --page-size $page_size --no-gh - } else { - gm gh query-api $"/repos/($repo)/releases" --page-size $page_size - } + gm gh query-api $"/repos/($repo)/releases" --page-size $page_size --no-gh=$no_gh } # get information about a GitHub user @@ -198,11 +194,7 @@ export def "gm gh query-user" [ user: string # the user to query information about --no-gh # force to use `http get` instead of `gh` ]: nothing -> record { - if $no_gh { - gm gh query-api $"/users/($user)" --no-paginate --no-gh - } else { - gm gh query-api $"/users/($user)" --no-paginate - } + gm gh query-api $"/users/($user)" --no-paginate --no-gh=$no_gh } # checkout one of the repo's PR interactively