Skip to content

Improve GitHub CLI request example for updating custom values #31267

@NovemberTang

Description

@NovemberTang

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/repos/custom-properties?apiVersion=2022-11-28#create-or-update-custom-property-values-for-a-repository

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

In the request example section the GitHub CLI example looks like this

gh api \
  --method PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /repos/OWNER/REPO/properties/values \
  -F "properties[]=[object Object]" -F "properties[]=[object Object]" -F "properties[]=[object Object]" 

-F "properties[]=[object Object]" is repeated three times, which looks like it might be an error, if properties[] is meant to be a list. It would also be really helpful to have a concrete example of how to format the string I pass in place of [object Object] as I've not been able to figure it out by myself.

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 issuerestContent related to rest - overview.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions