Skip to content

gh api example paths should not have a leading slash #2140

Closed
@earthlyreason

Description

@earthlyreason

Code of Conduct

What article on docs.github.com is affected?

This is in any article that uses the cURL/JavaScript/GitHub CLI examples.

Here is what it looks like for me:

image

That request will produce a 404. Whereas this request works:

gh api \
  -H "Accept: application/vnd.github+json" \
  repos/OWNER/REPO/actions/artifacts

The only difference is in removal of the leading slash.

What changes are you suggesting?

The examples don't work as written, apparently due to the leading slash before repos. That slash is (correctly) not used in the examples in the documentation of the gh api subcommand.

I presume these examples are generated and that a single code change would correct all instances.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions