-
Notifications
You must be signed in to change notification settings - Fork 64.2k
Closed
Labels
contentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the teamDo not begin working on this issue until triaged by the team
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/rest/issues/labels
What part(s) of the article would you like to see updated?
JSON Schema (and perhapes the examples) of the affected endpoints, including getting labels, creating labels, and adding labels to issues.
Additional information
You can repro this by making a request to add a label to an issue/PR. If the label doesn't exist, it will be created as well, which is really helpful for users. But it is created with a null description, and in the response, description is returned as null, which is not what the API declares. The field should be declared nullable in the API description.
Repro:
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token <TOKEN>" \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/labels \
-d '{"labels":["app-name/new-label"]}'Metadata
Metadata
Assignees
Labels
contentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the teamDo not begin working on this issue until triaged by the team
[ { "id": 9999999999, "node_id": "Some_ID_String", "url": "https://api.github.com/repos/OWNER/REPO/labels/app-name/new-label", "name": "app-name/new-label", "color": "ededed", "default": false, "description": null // <----- null, as the repo owner has not set one yet. } ]