docs
docs copied to clipboard
Fix curl request in rest code samples
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
All rest articles containing code samples with header X-GitHub-Api-Version. For example:
- https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28
- https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28
- https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28
What part(s) of the article would you like to see updated?
Line:
-H "Authorization: Bearer <YOUR-TOKEN>"\
Doesn't have a space between " and \. As a result, the cURL request does not work correctly.
To fix this, the line should be replaced by:
-H "Authorization: Bearer <YOUR-TOKEN>" \
Additional information
PLEASE FIX IT
PLEASE FIX IT
GitHub CLI api
https://cli.github.com/manual/gh_api
gh api
--method PATCH
-H "Accept: application/vnd.github+json"
-H "X-GitHub-Api-Version: 2022-11-28"
/repos/OWNER/REPO/import
-f vcs='tfvc'
-f tfvc_project='project1'
-f human_name='project1 (tfs)'
@pietervdheijden Thanks for opening an issue! Looks like one of our bots closed your first one, so thanks for adjusting it and trying again!
I'll get this triaged for review! :zap:
Thank you for opening this issue! Changes to the REST API schema can be requested in github/rest-api-description. I will transfer your issue over to that open source repo.
@pietervdheijden Per the bot above, these kind of changes will need to be made in /rest-api-description. I just saw your PR, so will close it in favor of this transfer 💛
Thank you for opening this issue! Changes to the REST API schema can be requested in github/rest-api-description. I will transfer your issue over to that open source repo.
@cmwilson21 Are you sure this change has to be done in /rest-api-description? It seems that repository contains the OpenAPI reference, whereas the bug I reported is in the code sample block. Also, I can't find <YOUR-TOKEN> in repository /rest-api-description...
Ok so where do I fix th
On Mon, Jul 3, 2023, 9:49 AM Pieter van der Heijden < @.***> wrote:
@cmwilson21 https://github.com/cmwilson21 Are you sure this change has to be done in /rest-api-description? It seems that repository contains the OpenAPI reference, whereas the bug I reported is in the code sample block. Also, I can't find <YOUR-TOKEN> in repository /rest-api-description...
— Reply to this email directly, view it on GitHub https://github.com/github/docs/issues/26396#issuecomment-1618513706, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5HOKZ634KPW67WPSWGQH63XOLLXTANCNFSM6AAAAAAZ2ISGXU . You are receiving this because you commented.Message ID: @.***>
@cmwilson21 can you still reply to my comment?
@pietervdheijden Sorry for the delay, we had several out and I missed your comment. Code samples and example responses are updated internally and I believe this example fits that.
On a different note, it doesn't look like the automation to transfer this to the right repo pushed through, so I've manually opened it here. I'm going to go ahead and close this out but will happily reopen if it I am mistaken 💛
how and thank u