Skip to content

Improve "--hostname HOSTNAME" for "Upload a release asset" on GitHub Enterprise cloud #39329

@abhivarma007

Description

@abhivarma007

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset

What part(s) of the article would you like to see updated?

For the GitHub enterprise cloud below GH CLI is expecting the HOSTNAME while it should take the default as api.github.com.

# GitHub CLI api
# https://cli.github.com/manual/gh_api

gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  --hostname HOSTNAME \
  /repos/OWNER/REPO/releases/RELEASE_ID/assets?name=example.zip \
   -f '@example.zip'

Documentation shoudl explicity say why HOSTNAME parameter is used and why
I believe it should also only need to show when someone selects "Version: Enterprsie Server 3.x.x" Attached image for your reference.

Image

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamfix-internallyTriggers a workflow to copy the issue internally and close the current issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions